Hi,
I have a little problem with accessing a label, after creating several labels using the same name.
Each time i create a label, i use the following code:
The problem is that I don't know how to re access a specified label in order to change the text of the corresponding label.Code:QLabel* lbl = new QLabel(" ", ui->scrollAreaContents);
I tried to set for each "lbl" created an ObjectName, in order to differentiate between all the labels created:
Code:lbl->setObjectName("label" + QString::number(i));
Is the setObjectName() a good way to solve my problem? if so, how should i change the text of a specified label using the ObjectName ?
And if it's not a good solution, how should i solve my problem ?
Any help would be appreciated,
Best Regards,
Lipos123





