Hello. I have following components on my MainWindow ui: groupBox1, label1, button1.
Problem is that I need to set some properties at the same time to groupBox1, label1, button1 and groupBox2, label2 etc
Is there a way or iterator (foreach, for) to do this by changing the index number of the components. Thanks.
Qt Code:
int i = 1; ui->groupBox[i]->setEnabled(true); ui->label[i]->setText("some text"); ---------------------- current code: ui->groupBox1->setEnabled(true); ui->label1->setText("some text");To copy to clipboard, switch view to plain text mode
Bookmarks