Qt: Delete settings windows on close

This commit is contained in:
Stenzek 2024-01-20 20:10:55 +10:00
parent b98ac8722a
commit a0370c7fb7
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View File

@ -68,6 +68,13 @@ SettingsWindow::~SettingsWindow()
s_open_game_properties_dialogs.removeOne(this);
}
void SettingsWindow::closeEvent(QCloseEvent* event)
{
// we need to clean up ourselves, since we're not modal
if (isPerGameSettings())
deleteLater();
}
void SettingsWindow::addPages()
{
addWidget(

View File

@ -98,7 +98,8 @@ private Q_SLOTS:
void onRestoreDefaultsClicked();
protected:
void wheelEvent(QWheelEvent* event);
void closeEvent(QCloseEvent* event) override;
void wheelEvent(QWheelEvent* event) override;
private:
enum : u32