mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:35:10 +00:00
UI: GraphWindow: Fix close event handling.
This commit is contained in:
parent
fd4dd77325
commit
644e3a253f
@ -249,6 +249,9 @@ void FortManager::showGraphWindow()
|
||||
m_graphWindow = new GraphWindow();
|
||||
|
||||
m_graphWindowState->install(m_graphWindow);
|
||||
|
||||
connect(m_graphWindow, &GraphWindow::aboutToClose,
|
||||
this, &FortManager::closeGraphWindow);
|
||||
}
|
||||
|
||||
m_graphWindow->show();
|
||||
|
@ -32,3 +32,10 @@ void WidgetWindow::hideEvent(QHideEvent *event)
|
||||
|
||||
emit visibilityChanged();
|
||||
}
|
||||
|
||||
void WidgetWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
emit aboutToClose();
|
||||
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
|
@ -16,12 +16,16 @@ signals:
|
||||
|
||||
void visibilityChanged();
|
||||
|
||||
void aboutToClose();
|
||||
|
||||
protected:
|
||||
void moveEvent(QMoveEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void hideEvent(QHideEvent *event) override;
|
||||
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif // WIDGETWINDOW_H
|
||||
|
Loading…
Reference in New Issue
Block a user