samuel.rodal at nokia.com
Fri Jan 27 08:51:53 CET 2012
On 01/26/2012 08:21 PM, ext Anselmo L. S. Melo wrote:
> A window is a top level window if it has no parent, correct? Code and comments in qwindow.cpp also confirm that.
> With that in mind, it seems reasonable that QGuiApplication::topLevelWindows() should return a list of QWindows with parent()==0.
> However, the returned list contains all QWindows created, including the ones that don't respect this condition.
> So, it seems we need to either adjust QGuiApplication::topLevelWindows() or control which windows are added to
> QGuiApplicationPrivate::window_list - currently, all windows are prepended to this list in QWindow's ctors.
Agreed, maybe just make QGuiApplication::topLevelWindows() filter the
window_list, since it would take more work to keep track of a
top_level_window_list in qwindow.cpp.
> Also, would it be useful to have QGuiApplication::allWindows()?
Yep, it might be.
More information about the Development