ravas
27th October 2015, 09:50
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.
mdiArea->closeAllSubWindows();
qDebug() << mdiArea->subWindowList().length();
If I have 2 sub-windows open,
the debug ouput is 2.
Qt 5.5 / win 7
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.
mdiArea->closeAllSubWindows();
qDebug() << mdiArea->subWindowList().length();
If I have 2 sub-windows open,
the debug ouput is 2.
Qt 5.5 / win 7