Reputation: 14985
Anyone have a slick function that will return a nested tree of all the children of a particular widget?
I'm familiar with dumpObjectTree() but I'm not able to compile in debug mode, so I don't have access to that function.
Trying to find a particular widget and I'm traversing the children() hierarchy by hand. There's got to be a better way!
Upvotes: 4
Views: 10475
Reputation: 324
I found that a QObject
has a dumpObjectTree
method at this link. Is that what you're looking for?
Upvotes: 0
Reputation: 46499
QObject.findChild (or findChildren) will recursively search for a child and should do what you need.
Upvotes: 4