summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-11-14 22:14:52 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-11-15 12:27:39 +0100
commit523496984cf286f69dbbf1f3e19fdb7153adef1b (patch)
treedb818383d401553ce113327b7caf763b912f02ee /examples
parent5827ee5ffc429591648019b6f19b72bf4207fe7e (diff)
QMessageBox: Reflect native dialog visibility via QWidget state
When a QMessageBox has a native backend we want the QWidget state of the dialog to still reflect whether the dialog is visible or not, as this is used by various features of QMessageBox, such as resolving the default escape button, for example. It is also key to being able to test the dialog, since the auto test relies on the observable widget state, and being able to send key events to the widget to trigger hiding of the dialog. The other QDialog subclasses with native dialog backends handle this by showing the native dialog, and then setting Qt::WA_DontShowOnScreen before calling QDialog::setVisible(), which results in the widget state being "correct", but not showing any widget-based dialog. QMessageBox however, did not implement setVisible(), and relied on the QDialog implementation, which does not contain similar logic. Ideally we want to clean up these overrides of setVisible(), and let QDialog handle Qt::WA_DontShowOnScreen for all native dialogs, but in the meantime we teach QMessageBox to do the same trick as the other dialog subclasses. Task-number: QTBUG-108153 Change-Id: I44c67cc9cd89660a703883bd57f351df70d7bdd3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions