- QQueue, QLabel QLineEdit. , . QGridLayout , . , , .
http://doc.trolltech.com/4.4/qqueue.html
QQueue<QLineEdit *> linedit;
QGridLayout *gridboxLayout;
gridboxLayout= new QGridLayout();
linedit.enqueue(new QLineEdit ());
gridboxLayout->addWidget(linedit.last(),row,column);
this->setLayout(gridboxLayout);
, .., . QQueue gridLayout. .
Another easy way to do this, which will work with the designer, if you have a reasonable maximum number of elements, is simply to build all this and hide the widgets that you do not want to see until you need them.
source
share