This commit is contained in:
parent
72b7e55603
commit
cb92357cbd
|
@ -38,8 +38,11 @@ BackupPointListDialog::BackupPointListDialog(QWidget *parent, bool isOnlyShowLoc
|
|||
m_tableWidget = new QTableWidget;
|
||||
m_tableWidget->setColumnCount(headerLabels.size());
|
||||
m_tableWidget->setHorizontalHeaderLabels(headerLabels);
|
||||
m_tableWidget->horizontalHeader()->setDefaultAlignment(Qt::AlignCenter);
|
||||
m_tableWidget->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||
m_tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
// m_tableWidget->horizontalHeader()->setSectionResizeMode(Column_Index::Backup_Name, QHeaderView::Stretch);
|
||||
// m_tableWidget->horizontalHeader()->setSectionResizeMode(Column_Index::UUID, QHeaderView::Stretch);
|
||||
// m_tableWidget->horizontalHeader()->setSectionResizeMode(Column_Index::Backup_Device, QHeaderView::Stretch);
|
||||
m_tableWidget->horizontalHeader()->setTextElideMode( Qt::ElideRight);
|
||||
m_tableWidget->horizontalHeader()->setFixedHeight(30);
|
||||
m_tableWidget->verticalHeader()->setHidden(true); // 好像隐藏不掉
|
||||
|
|
|
@ -42,7 +42,7 @@ signals:
|
|||
protected:
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
|
||||
void setItem(int row, int column, const QString& text, int alignFlag = Qt::AlignCenter);
|
||||
void setItem(int row, int column, const QString& text, int alignFlag = Qt::AlignLeft | Qt::AlignVCenter);
|
||||
QString text(int row, int column);
|
||||
|
||||
QTableWidget *m_tableWidget;
|
||||
|
|
|
@ -114,7 +114,7 @@ void ManageBackupPointList::insertLines(const QList<ParseBackupList::BackupPoint
|
|||
|
||||
m_tableWidget->insertRow(indexOfRow);
|
||||
setItem(indexOfRow, Column_Index::Backup_Name, backupPoint.m_backupName);
|
||||
setItem(indexOfRow, Column_Index::UUID, backupPoint.m_uuid, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
setItem(indexOfRow, Column_Index::UUID, backupPoint.m_uuid);
|
||||
setItem(indexOfRow, Column_Index::Backup_Time, backupPoint.m_time);
|
||||
setItem(indexOfRow, Column_Index::Backup_Size, backupPoint.m_size);
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ void SelectRestorePoint::insertLines(const QList<ParseBackupList::BackupPoint> &
|
|||
|
||||
m_tableWidget->insertRow(indexOfRow);
|
||||
setItem(indexOfRow, Column_Index::Backup_Name, backupPoint.m_backupName);
|
||||
setItem(indexOfRow, Column_Index::UUID, backupPoint.m_uuid, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
setItem(indexOfRow, Column_Index::UUID, backupPoint.m_uuid);
|
||||
setItem(indexOfRow, Column_Index::Backup_Time, backupPoint.m_time);
|
||||
setItem(indexOfRow, Column_Index::Backup_Size, backupPoint.m_size);
|
||||
|
||||
|
|
Loading…
Reference in New Issue