
Originally Posted by
rajeshs
Hi All,
I am having one QFrame in QDialog, I need to create dynamic labels based on some input given by user.the number of label is based on user input.
[ for Ex if user gives 6 as input i need 6 labels and then next if he gives 4 second time i need only 4 ,so i need to remove 2 labels now]
How to achieve this ?
What if you do something like this:
for (int i = 0; i < numberOfLabelsSpecified; i++) {
...
yourLayout->addWidget
(new QLabel(........
), row, column
);
...
}
for (int i = 0; i < numberOfLabelsSpecified; i++) {
...
yourLayout->addWidget(new QLabel(........), row, column);
...
}
To copy to clipboard, switch view to plain text mode
Bookmarks