Any idea why a window is found by mdiArea->currentSubWindow()
directly after mdiArea->closeAllSubWindows()?
mdiArea is a class member for a QMainWindow subclass.
The windows appear to have been closed after the function (QMainWindow::closeEvent) returns.
And the next time the function runs it will find the currentSubWindow to be null.
Qt Code:
mdiArea->closeAllSubWindows(); qDebug() << mdiArea->subWindowList().length();To copy to clipboard, switch view to plain text mode
If I have 2 sub-windows open,
the debug ouput is 2.
Qt 5.5 / win 7
Bookmarks