I\'m searching for something like the finished-signal from QDialog
, only for QWidget
. The reason is, I disable my toolbar once the widget pops up (whic
In your Widget class, you can add your own signal that others can connect to. Then override the closeEvent()
method. Don't worry about overriding this method, this kind of situation is exactly the right reason do to it.
class MyCustomWidget: public QWidget
{
Q_OBJECT
...
signals:
void WidgetClosed();
protected:
//===============================================================
// Summary: Overrides the Widget close event
// Allows local processing before the window is allowed to close.
//===============================================================
void closeEvent(QCloseEvent *event);
}
In the closeEvent
method trigger your signal:
void MyCustomWidget::closeEvent(QCloseEvent *event)
{
emit WidgetClosed();
event->accept();
}