[Development] QGuiApplication::topLevelWindows()

Anselmo L. S. Melo anselmo.melo at openbossa.org
Thu Jan 26 20:21:57 CET 2012


Hi,

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.

Also, would it be useful to have QGuiApplication::allWindows()?


Cheers,
Anselmo



-- 
Anselmo L. S. Melo
openBossa / INdT
http://www.indt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120126/56b01a21/attachment.sig>


More information about the Development mailing list