How to auto add line-edit and Label?
-
i'm creating a voting system and i'm stuck with a problem. i want to make a Qt application that asks Admin number of candidates to be participated in system and auto add lables for picture and line edits for name to be put on to..
example:enter number of cadidate: (say) 4;
now, the I want to make my QT understand there are 4 candidates so i can create 4 space for puting their data. -
@Sapok_5
You would either have to have, say, a vertical layout holding horizontal layouts with the widgets, and for new ones you would add to the vertical layout a new horizontal layout with new widgets on it. Or, by the sound of it, you should consider using aQListView
orQTableView
so that you can new rows. If you will only want a picture and a line editQListView
may suffice, if you might add further columnsQTableView
might be preferable.