Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.3.2, 5.15, 6.2.0 Beta4
-
None
-
OSX 10.10
-
-
7c26d7f482b9c15cc6ff850d5954151031010226 (qt/qtbase/dev) 8e22ea578cf92a19f8d07383655a294aa352d5b4 (qt/tqtc-qtbase/5.15) ae1921b0ea15435159dffb29b69ac2504b2932bd (qt/qtbase/6.1) bf70b362194c922f3abc065e4f164a4bb40a94b1 (qt/qtbase/6.2)
Description
If you run the following code, you get a main dialog, click on it and you get a Dialog. Click on that dialog, you get a QColorDialog. When the QColorDialog is closed, I'd expect my QDialog to get activated/focused/raised. But it gets behind my main dialog and the main dialog gets the focus.
#include <QtWidgets> class Dialog: public QDialog { public: Dialog(QWidget *parent) : QDialog(parent, Qt::Window) { setWindowTitle(tr("sub dialog")); } void mousePressEvent(QMouseEvent *) { QColorDialog::getColor(); } }; class MainDialog : public QMainWindow { public: MainDialog() { setWindowTitle(tr("main dialog")); } void mousePressEvent(QMouseEvent *) { Dialog *dlg = new Dialog(this); dlg->show(); } }; int main(int argc, char **argv) { QApplication app(argc, argv); MainDialog dlg; dlg.show(); return app.exec(); }