!32 fix update historywidget

Merge pull request !32 from likehomedream/my-2.0-devel
This commit is contained in:
KevinDuan 2023-10-18 08:59:39 +00:00 committed by Gitee
commit d84cc43bb7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 1 deletions

View File

@ -159,7 +159,6 @@ void MainWindow::initUI()
alllayout->addWidget(m_guideWidget);
alllayout->addWidget(m_historywidget);
}
m_historywidget->updateHistoryDir();
});
QFileSystemWatcher* watcher = new QFileSystemWatcher(this);
@ -187,6 +186,7 @@ void MainWindow::onGoHomeClicked()
m_stackedWidget->setCurrentIndex(0);
});
connect(m_cacheConfirmedWidget, &cacheConfirmedWidget::cacheSave, this, [=](){
m_historywidget->updateHistoryDir();
m_stackedWidget->setCurrentIndex(0);
});
} else {

View File

@ -109,7 +109,10 @@ void HistoryWidget::updateHistoryDir()
button->setThemeName(info->getThemeName());
button->setThemeType(info->getThemeType());
button->initUI();
connect(button,&HistoryButton::clicked,this,[=](){
emit startSecondEdit(info->getInfoData());
});
layout->addWidget(button, row, col);
col++;