Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
4.8.7, 5.4.0 RC
-
Windows 7 64 bit
MSVC 2010 32 bit
Description
- Have a simple main function:
#include <QApplication> #include <QMessageBox> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWidget w; QMessageBox mb; w.show(); mb.show(); return a.exec(); }
- Build and run this.
You'll see a QMessageBox in front of a QWidget. - Assign a parent to the QMessageBox:
QMessageBox mb; mb.setParent(&w); w.show();
- Build and run this.
The QMessageBox is gone. - Pass the parent to the ctor:
QMessageBox mb(&w); mb.setParent(&w);
- Build and run this.
The QMessageBox is back again.
I think that in all three cases the QMessageBox should be shown.