Hi all,
I have a form which includes several widgets(lineedits). Is it possible to read all of them programmatically without reading one by one? Perhaps through a loop.
Can this applied to any widget as well?
Many thanks in advance.
Hi all,
I have a form which includes several widgets(lineedits). Is it possible to read all of them programmatically without reading one by one? Perhaps through a loop.
Can this applied to any widget as well?
Many thanks in advance.
Assuming all these labels have a common parent widget (The Form containing them) this may be a viable solution:
Hope I could help you.Qt Code:
QList<QLabel*> labels = this->findChildren<QLabel *>(); // This refers to the formwidget // do something with the labels }To copy to clipboard, switch view to plain text mode
Kind regards
momesana
cbarmpar (25th September 2008)
Many thanks friend thats what i wanted.
Regards.
Bookmarks