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);
}
bool
MainWindow::event(QEvent *event)
{
auto type = event->type();
if (type == QEvent::Close) {
closeEvent(static_cast<QCloseEvent *>(event));
}
return QQuickView::event(event);
}
void
MainWindow::restoreWindowSize()
{

View file

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