diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 33223435c..a7d48852b 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -568,11 +568,11 @@ void Widget::moveEvent(QMoveEvent *event) QWidget::moveEvent(event); } -void Widget::hideEvent(QHideEvent *event) +void Widget::closeEvent(QCloseEvent *event) { if (Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray()) { - QWidget::hideEvent(event); + QWidget::closeEvent(event); } else { @@ -583,7 +583,7 @@ void Widget::hideEvent(QHideEvent *event) } saveWindowGeometry(); saveSplitterGeometry(); - QWidget::hideEvent(event); + QWidget::closeEvent(event); qApp->quit(); } } diff --git a/src/widget/widget.h b/src/widget/widget.h index 9b76b88a8..269d051bc 100644 --- a/src/widget/widget.h +++ b/src/widget/widget.h @@ -161,7 +161,7 @@ signals: protected: virtual bool eventFilter(QObject *obj, QEvent *event) final override; virtual bool event(QEvent * e) final override; - virtual void hideEvent(QHideEvent *event) final override; + virtual void closeEvent(QCloseEvent *event) final override; virtual void changeEvent(QEvent *event) final override; virtual void resizeEvent(QResizeEvent *event) final override; virtual void moveEvent(QMoveEvent *event) final override;