From ec8fb3abbabba10e23758235867a9ff95299b50d Mon Sep 17 00:00:00 2001 From: zhaominyong Date: Mon, 14 Mar 2022 09:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A9=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kybackup/backuppointlistdialog.h | 1 + kybackup/module/managebackuppointlist.cpp | 3 +++ kybackup/module/selectrestorepoint.cpp | 2 ++ 3 files changed, 6 insertions(+) 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); } }