Qt6 already has a closeEvent on QQuickView

This commit is contained in:
Nicolas Werner 2022-04-16 04:11:08 +02:00
parent f7e5b590b5
commit 6fbb755277
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 1 additions and 14 deletions

View file

@ -156,18 +156,6 @@ MainWindow::setWindowTitle(int notificationCount)
QQuickView::setTitle(name); QQuickView::setTitle(name);
} }
bool
MainWindow::event(QEvent *event)
{
auto type = event->type();
if (type == QEvent::Close) {
closeEvent(static_cast<QCloseEvent *>(event));
}
return QQuickView::event(event);
}
void void
MainWindow::restoreWindowSize() MainWindow::restoreWindowSize()
{ {

View file

@ -81,8 +81,7 @@ public:
#endif #endif
protected: protected:
void closeEvent(QCloseEvent *event); void closeEvent(QCloseEvent *event) override;
bool event(QEvent *event) override;
private slots: private slots:
//! Handle interaction with the tray icon. //! Handle interaction with the tray icon.