QObject::findChildren() can find all children of a given type, it does not require a name as explained and demonstrated in the docs:
andOmitting the name argument causes all object names to be matched. The search is performed recursively.
In your case you want all QWidgets.This example returns all QPushButtons that are children of parentWidget:
Qt Code:
QList<QPushButton *> allPButtons = parentWidget.findChildren<QPushButton *>();To copy to clipboard, switch view to plain text mode
Bookmarks