Emit signal when hiding due to focus loss to a non-related window.

This commit is contained in:
Eike Hein 2014-04-30 19:17:14 +02:00
parent 3ebbedead2
commit 2591685579
2 changed files with 6 additions and 0 deletions

View File

@ -798,6 +798,7 @@ void Dialog::focusOutEvent(QFocusEvent *ev)
if (!parentHasFocus && !childHasFocus) {
qDebug() << "DIALOG: hiding dialog.";
setVisible(false);
emit windowDeactivated();
}
}

View File

@ -169,6 +169,11 @@ Q_SIGNALS:
void hideOnWindowDeactivateChanged();
void outputOnlyChanged();
void flagsChanged();
/**
* Emitted when the @see hideOnWindowDeactivate property is @c true and this dialog lost focus to a
* window that is neither a parent dialog to nor a child dialog of this dialog.
*/
void windowDeactivated();
protected:
/*