优化空列表展示
This commit is contained in:
parent
12ec5665d2
commit
ec8fb3abba
|
@ -2,6 +2,7 @@
|
|||
#define BackupPointListDialog_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QHeaderView>
|
||||
#include <QTableWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
|
|
|
@ -154,9 +154,11 @@ void ManageBackupPointList::insertLines(const QList<ParseBackupList::BackupPoint
|
|||
m_tableWidget->sortItems(Column_Index::Backup_Time, Qt::DescendingOrder);
|
||||
m_labelEmpty->setVisible(false);
|
||||
m_labelEmptyText->setVisible(false);
|
||||
m_tableWidget->horizontalHeader()->setVisible(true);
|
||||
} else {
|
||||
m_labelEmpty->setVisible(true);
|
||||
m_labelEmptyText->setVisible(true);
|
||||
m_tableWidget->horizontalHeader()->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -174,6 +176,7 @@ void ManageBackupPointList::deleteBackupPoint(ParseBackupList::BackupPoint backu
|
|||
if (this->m_tableWidget->rowCount() ==0) {
|
||||
m_labelEmpty->setVisible(true);
|
||||
m_labelEmptyText->setVisible(true);
|
||||
m_tableWidget->horizontalHeader()->setVisible(false);
|
||||
}
|
||||
});
|
||||
deleteDialog->exec();
|
||||
|
|
|
@ -167,9 +167,11 @@ void SelectRestorePoint::insertLines(const QList<ParseBackupList::BackupPoint> &
|
|||
if (0 < indexOfRow) {
|
||||
m_tableWidget->setSortingEnabled(true); // 等录入完数据后再排序
|
||||
m_tableWidget->sortItems(Column_Index::Backup_Time, Qt::DescendingOrder);
|
||||
m_tableWidget->horizontalHeader()->setVisible(true);
|
||||
} else {
|
||||
m_labelEmpty->setVisible(true);
|
||||
m_labelEmptyText->setVisible(true);
|
||||
m_tableWidget->horizontalHeader()->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue