[Qt-interest] Window list in z-order?
John Weeks
john at wavemetrics.com
Wed Oct 6 18:43:56 CEST 2010
Our application has document windows of many kinds (think along the
lines of a scientific IDE). A common action is to find the top
document of a given kind. Presently, in Macintosh and Windows code, we
get the top (in z-order) window of any kind, then walk down the window
list looking for the first one of the given kind.
Can anyone suggest a way to implement this in Qt? These document
"windows" might be actual windows (QMainWindow or just QWidget with
custom code to make it functioning window), or they might be
QMdiSubWindow (which isn't an actual window).
I see QApplication::topLevelWidgets() and QApplication::allWidgets().
The documentation doesn't tell me about the ordering of the list. It
also seems like allWidgets would probably include too many widgets,
and topLevelWidgets would include only widgets that are also windows.
Am I right about that?
I also see QApplication::focusWidget(). That seems like it might give
me something like the top window in z-order, but it might also give me
a sub-widget of a compound widget.
Will I have to roll my own document-in-Z-order list and maintain it
myself?
Thanks for any insight!
Regards,
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
email support at WaveMetrics.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101006/d5cfcf92/attachment.html
More information about the Qt-interest-old
mailing list