ensure application is closed when window is closed

This commit is contained in:
Malte Jürgens 2022-07-27 15:11:53 +02:00
parent fa83e2d9a8
commit cfbb4152c3
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3
2 changed files with 3 additions and 0 deletions

View file

@ -38,3 +38,5 @@ void MainWindow::fullScreenRequested(
fullScreenRequest.accept(); fullScreenRequest.accept();
fullScreenRequest.toggleOn() ? showFullScreen() : showNormal(); fullScreenRequest.toggleOn() ? showFullScreen() : showNormal();
} }
void MainWindow::closeEvent(QCloseEvent *event) { QApplication::quit(); }

View file

@ -21,6 +21,7 @@ private:
QWebEngineView *m_webView; QWebEngineView *m_webView;
QWebEngineProfile *prepareProfile(); QWebEngineProfile *prepareProfile();
DiscordPage *m_discordPage; DiscordPage *m_discordPage;
void closeEvent(QCloseEvent *event) override;
private Q_SLOTS: private Q_SLOTS:
void fullScreenRequested(QWebEngineFullScreenRequest fullScreenRequest); void fullScreenRequested(QWebEngineFullScreenRequest fullScreenRequest);