Issue with isActiveWindow()
In the examples\mainwindows\mdi
i tried the following code
Code:
QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
foreach (QMdiSubWindow *pSubWindow, windows)
{
bActive = pSubWindow->isActiveWindow();
bHasFocus = pSubWindow->hasFocus();
}
I tried with 3 subwindows. Even though only one is active [ie selected], all the subwindows are giving the status as active....Also none of the subwindows are having the focus...Why..?
Re: Issue with isActiveWindow()
I'd say this is because those methods are not related to QMdiSubWindow but to the top-level window of your application (which is active). Use QMdiArea::activeSubWindow() to query for the active subwindow.
Re: Issue with isActiveWindow()
I have to use the code within plugins and there is NO acces to the main application MdiArea....
Re: Issue with isActiveWindow()