Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.11.3
-
None
Description
A rough action plan :
1. create QMessageBox object;
2. call QMessageBox::show();
3. close dialog through click 'X' on window;
4. re-show dialog through call QMessageBox::show().
After these actions, an entry appears in debug output: "QWindowsNativeInterface::nativeResourceForWindow: 'handle' requested for null window or window without handle (qWarning).
Minimal code example:
int main(int argc, char *argv[]) { QApplication a(argc, argv); QMessageBox msgBox; QObject::connect(&msgBox, &QMessageBox::finished, &msgBox, &QMessageBox::show, Qt::QueuedConnection); msgBox.show(); return a.exec(); }
Qt::QueuedConnection is mandatory, direct call from signal handler does not produce this behavior. Similar behavior can be obtained by calling QMessageBox::show(), for example, from QPushButton::clicked or all other widget signal.