Fix: the result widget dont hide while stopping search.

This commit is contained in:
JunjieBai 2022-08-24 09:57:07 +08:00
parent aa425fe91b
commit 8e41b58969
1 changed files with 6 additions and 4 deletions

View File

@ -301,10 +301,12 @@ void MainWindow::searchKeywordSlot(const QString &keyword)
//NEW_TODO //NEW_TODO
if(keyword == "") { if(keyword == "") {
// m_stackedWidget->setPage(int(StackedPage::HomePage)); // m_stackedWidget->setPage(int(StackedPage::HomePage));
m_askTimer->stop(); QTimer::singleShot(10, this, [ = ]() {
Q_EMIT m_searchResultPage->stopSearch(); m_askTimer->stop();
m_searchResultPage->hide(); Q_EMIT m_searchResultPage->stopSearch();
this->resizeHeight(68); m_searchResultPage->hide();
this->resizeHeight(68);
});
} else { } else {
// m_stackedWidget->setPage(int(StackedPage::SearchPage)); // m_stackedWidget->setPage(int(StackedPage::SearchPage));