slava
15th July 2010, 19:27
If I have let's say 100 line edits and I need to write Hello! to each of those, can I just cycle through the object names with one command in the cycle, something like:
for (int c = 0; c < 100; c++) {
lineEdit_c->setText("Hello!");
}
I know the above example is weird, but is there a way to do something similar? I have something like a hundred lines code working with a tableWidget (taking data from a file and fill in the cells) but then there are 15 tableWidgets needs to be handled in same way. There will be no changeSignal or any other signals emmited.
for (int c = 0; c < 100; c++) {
lineEdit_c->setText("Hello!");
}
I know the above example is weird, but is there a way to do something similar? I have something like a hundred lines code working with a tableWidget (taking data from a file and fill in the cells) but then there are 15 tableWidgets needs to be handled in same way. There will be no changeSignal or any other signals emmited.