diff --git a/kybackup/backuppointlistdialog.h b/kybackup/backuppointlistdialog.h index 596a39b..5d31a5f 100755 --- a/kybackup/backuppointlistdialog.h +++ b/kybackup/backuppointlistdialog.h @@ -2,6 +2,7 @@ #define BackupPointListDialog_H #include +#include #include #include #include diff --git a/kybackup/module/managebackuppointlist.cpp b/kybackup/module/managebackuppointlist.cpp index 5f34ac4..a963754 100755 --- a/kybackup/module/managebackuppointlist.cpp +++ b/kybackup/module/managebackuppointlist.cpp @@ -154,9 +154,11 @@ void ManageBackupPointList::insertLines(const QListsortItems(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(); diff --git a/kybackup/module/selectrestorepoint.cpp b/kybackup/module/selectrestorepoint.cpp index 0c47db1..47b8514 100755 --- a/kybackup/module/selectrestorepoint.cpp +++ b/kybackup/module/selectrestorepoint.cpp @@ -167,9 +167,11 @@ void SelectRestorePoint::insertLines(const QList & 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); } }