This->layout_h->addWidget(button_add_person) This->button_add_person = new my_QPushButton("+") This->layout_h->addWidget(label_columns) This->label_columns = new QLabel("Persons:") Thank you in = new QGridLayout() this->layout_h = new QHBoxLayout() But how can I manage that with QGridLayout which has no function like that? Also I miss the function insertWidget(QWidget*), because I'd like to insert the new QTextEdits at a specific index.ĭo I really have to solve this with multiple QVBoxLayouts in a QHboxLayout? That would be really sad.Īlso I still don't have a solution for the default size of the QTextEdits. It inserts an invisible thing that is stretchable. Using QBoxLayouts, there is a very nice function called "addStretch()", what exactly does what I need. but how can I do that? (I hope it's not necessary to solve this by catching the resizeEvent and manually adding bigger space and fixing QTextEdit every time.) Is it possible to have the same effect on the QTextEdits, like when user enlarges the Window, only the spacing between these Edits grows but not the Edits itsself? I think of setting RowStretch of QTextEdits to zero and then adding a strechable thing that is not visible between them. I know that this must be possible, because my QPushButton and my QCheckBox don't grow, instead, they just move with the border. That is also an effect I would like to avoid. When user changes QWidget by mouse-click down on the QWidget border and enlarging it -> my QTextEdits grow. Using setGeometry() needs also x and y position, that is also not what I need. Problem is, I only see functions like setMinimumHeight(int) or setMaximumHeight(int), but that is not what I want. ![]() How can I set a starting height to the QTextEdits? The QTextEdits are too big (to high) by default, so I'd like to set a default height to them. On click on the button new QTextEdits should be stored in a new column, so I need a QGridLayout. ![]() ![]() It contains about 10 QTextEdits and on the bottom a QPushButton and a QCheckBox.
0 Comments
Leave a Reply. |