修复搜索一次后隐藏界面再次唤醒会闪一下的问题

This commit is contained in:
JunjieBai 2023-07-07 16:19:12 +08:00 committed by iaom
parent 17f291b9a2
commit b87bf5573b
1 changed files with 2 additions and 1 deletions

View File

@ -368,10 +368,11 @@ bool MainWindow::tryHideMainwindow()
if (!m_isAskDialogVisible && QApplication::activeModalWidget() == nullptr) { if (!m_isAskDialogVisible && QApplication::activeModalWidget() == nullptr) {
qDebug()<<"Mainwindow will be hidden"; qDebug()<<"Mainwindow will be hidden";
m_currentSearchAsked = false; m_currentSearchAsked = false;
this->hide();
m_askTimer->stop(); m_askTimer->stop();
m_researchTimer->stop(); m_researchTimer->stop();
Q_EMIT m_searchResultPage->stopSearch(); Q_EMIT m_searchResultPage->stopSearch();
this->clearSearchResult();
this->hide();
return true; return true;
} else { } else {
//有上层弹窗未关闭,不允许隐藏主界面 //有上层弹窗未关闭,不允许隐藏主界面