Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
4.7.1
Description
Calling hide() and show() in sequence on a QDialog may result in the following X errors:
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 20 (X_GetProperty)
Resource id: 0x16095c7
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 15 (X_QueryTree)
Resource id: 0x16095c7
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 40 (X_TranslateCoords)
Resource id: 0x16095c7
This happens with 4.3 and 4.4
The following example reproduces the problem:
#include <QtGui> class Dialog : public QDialog { Q_OBJECT public: Dialog(QWidget *parent = 0) : QDialog(parent) { QPushButton *b = new QPushButton("hide/show", this); connect(b, SIGNAL(clicked()), this, SLOT(foo())); } public slots: void foo() { hide(); show(); } }; #include "main.moc" int main(int argc, char *argv[]) { QApplication app(argc, argv); Dialog dialog; dialog.show(); return app.exec(); }