//Get all QLabels that are children of this QObject QList<QLabel *> allLabels = findChildren<QLabel *>(); foreach (QLabel *label, allLabels) label->setText("Text");