diff options
author | Arno <arno@disconnect.de> | 2020-11-22 02:47:33 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2020-11-22 02:47:33 +0100 |
commit | 9b0fb916acb6024988018ec5d13f52490f46d272 (patch) | |
tree | 54dfd37955cf9a3c8b954178fe9a2e4993070774 | |
parent | 37207b5a188ba7b49165eacb82abc1e19434dcf2 (diff) | |
download | SheMov-9b0fb916acb6024988018ec5d13f52490f46d272.tar.gz SheMov-9b0fb916acb6024988018ec5d13f52490f46d272.tar.bz2 SheMov-9b0fb916acb6024988018ec5d13f52490f46d272.zip |
Make SearchDialog parentless
Don't raise SearchDialog every time MainWindow is clicked.
-rw-r--r-- | shemov.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -48,7 +48,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla //init database as early as possible splash.showMessage(tr("Initializing globals..."), Qt::AlignHCenter, Qt::yellow); qApp->processEvents(); - mSearchDialog = new SearchDialog(this); + mSearchDialog = new SearchDialog(); mSearchDialog->setHidden(true); (void) SmGlobals::instance(); @@ -64,7 +64,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(mConsistencyA, &QAction::triggered, this, &SheMov::checkConsistency); QAction *searchDialogA = new QAction(tr("Search..."), this); searchDialogA->setShortcut(tr("CTRL+f")); - connect(searchDialogA, &QAction::triggered, mSearchDialog, &SearchDialog::show); + connect(searchDialogA, &QAction::triggered, mSearchDialog, [&] { mSearchDialog->show(); mSearchDialog->raise(); }); mQuitA = new QAction(tr("Quit"), this); mQuitA->setShortcut(tr("CTRL+q")); connect(mQuitA, &QAction::triggered, qApp, &QApplication::closeAllWindows); |