fix update historywidget

This commit is contained in:
likehomedream 2023-10-13 16:25:18 +08:00
parent 88682de806
commit 8dc9c9ce98
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++;