Qt: dynamic interface tips

I am trying to create a user interface containing a list of such elements:
http://img707.imageshack.us/img707/1114/16900293.png
http://img707.imageshack.us/img707/1114/16900293.png
http: // img707 .imageshack.us / img707 / 1114 / 16900293.png

The user can change the number of elements, so the user interface is dynamic.

What are the best components for user input like the one in the picture? Is it short QLabeland QLineEdits?
What is the best way to manage them?

+3
source share
3 answers

(, ), , , . .

+1

, QTableView ( QTableWidget). "x =", "(2n" "t" ) , .

QTableView QLineEdits , . . , , Excel.

+4

- 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.

+3
source

Source: https://habr.com/ru/post/1764401/


All Articles