2026年5月25日15:57:50

This commit is contained in:
2026-05-25 15:58:11 +08:00
parent 1cb9d5ac42
commit 358a56f602
20 changed files with 413 additions and 492 deletions
+9 -2
View File
@@ -25,6 +25,13 @@ FileManageWidget::FileManageWidget(QWidget *parent) :
ui->systemFileListView->setProperty("searchPath", DOC_ROOT_DIR);
ui->udiskFileListView->setProperty("searchPath", UDISK_DOC_ROOT_DIR);
// 清理ui文件中,用于调试的item
ui->systemFileListView->clear();
ui->udiskFileListView->clear();
ui->systemFileListView->setMouseTracking(true);
ui->udiskFileListView->setMouseTracking(true);
updateUDiskDevList();
m_focusedListView = ui->systemFileListView;
@@ -47,7 +54,7 @@ bool FileManageWidget::eventFilter(QObject *watched, QEvent *event)
return false;
}
if(event->type() != QEvent::FocusIn) {
if(event->type() != QEvent::FocusIn && event->type() != QEvent::MouseMove && event->type() != QEvent::MouseButtonPress) {
return false;
}
@@ -65,7 +72,7 @@ bool FileManageWidget::eventFilter(QObject *watched, QEvent *event)
m_focusedListView = dynamic_cast<QListWidget *>(watched);
backgroundPanel = dynamic_cast<QWidget *>(watched->parent());
palette = backgroundPanel->palette();
palette.setColor(backgroundPanel->backgroundRole(), QColor(175, 218, 223));
palette.setColor(backgroundPanel->backgroundRole(), "#5396C1");
backgroundPanel->setPalette(palette);
return false;