From 05bcf22af47c7c70cb1dfb7f2b2b9d44e5cd9509 Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 7 Oct 2019 17:30:47 +0200 Subject: [PATCH] clear search field when reopening settings --- src/widgets/dialogs/SettingsDialog.cpp | 5 +++++ src/widgets/dialogs/SettingsDialog.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/src/widgets/dialogs/SettingsDialog.cpp b/src/widgets/dialogs/SettingsDialog.cpp index d3edcb773..73ad5f756 100644 --- a/src/widgets/dialogs/SettingsDialog.cpp +++ b/src/widgets/dialogs/SettingsDialog.cpp @@ -285,6 +285,11 @@ void SettingsDialog::themeChangedEvent() this->setPalette(palette); } +void SettingsDialog::showEvent(QShowEvent *) +{ + this->ui_.search->setText(""); +} + ///// Widget creation helpers void SettingsDialog::onOkClicked() { diff --git a/src/widgets/dialogs/SettingsDialog.hpp b/src/widgets/dialogs/SettingsDialog.hpp index ff409fec2..5a064b667 100644 --- a/src/widgets/dialogs/SettingsDialog.hpp +++ b/src/widgets/dialogs/SettingsDialog.hpp @@ -39,6 +39,7 @@ public: protected: virtual void scaleChangedEvent(float newDpi) override; virtual void themeChangedEvent() override; + virtual void showEvent(QShowEvent *) override; private: static SettingsDialog *handle;