Hi,
Is there any way to browse through all the children objects of a widget. Maybe this should be recursively...
Any idea how to do this?
Thanks,
Carlos.
Hi,
Is there any way to browse through all the children objects of a widget. Maybe this should be recursively...
Any idea how to do this?
Thanks,
Carlos.
Qt Code:
{ QObjectList children = parent->children(); QObjectList::const_iterator it = children.begin(); QObjectList::const_iterator eIt = children.end(); while ( it != eIt ) { BrowseChildren( pChild ); } }To copy to clipboard, switch view to plain text mode
Of course, you might want to do something with each child widget as it is discovered. Read the docs: the order of the list is determined by the stacking order of the widgets. Bringing a widget to the top of the stack by raising it changes the order.
qlands (6th July 2011)
Excellent. Thanks.
Bookmarks