Increase the size of the box in a form to fit the text
- 
Hi, 
 I have created some layouts to display a form, but the size of the linedit box with the
 “patient["clinical_department"]” or “patient["surname"])” are too small and the text doesn’t fit.
 What can I do?@layout = new QFormLayout; 
 _layout3 = new QVBoxLayout(this);while(!patients3.isEmpty()) { 
 QMap<QString,QString> patient = patients3.takeFirst();
 if (patient["id"]==itemId) {
 QLineEdit *MyLineEdit = new QLineEdit(patient["clinical_department"]);
 layout->addRow("ID",MyLineEdit);
 layout->addRow("Surname", new QLineEdit(patient["surname"]));
 }
 }
 listview->setLayout(layout);
 this->_layout3->addWidget(listview);
 }@
- 
Hi, I need a little help with my code. I am trying to put scrollbars on my code. 
 It is a form that i would like to be in a groupbox and the groupbox in a qvboxlayout.@ 
 QVBoxLayout* _layout3;
 QFormLayout* layout;QScrollArea *scrollArea = new QScrollArea(this); 
 scrollArea->setWidgetResizable(true);
 QGroupBox *groupBox = new QGroupBox(scrollArea);QWidget *baseArea = new QWidget(); baseArea->setLayout(_layout3); scrollArea->setWidget(baseArea); while(!patients3.isEmpty()) { QMap<QString,QString> patient = patients3.takeFirst(); if (patient["id"]==itemId) { QLineEdit *MyLineEdit = new QLineEdit(patient["id"]); layout->addRow("ID",MyLineEdit); layout->addRow("Surname", new QLineEdit(patient["surname"])); layout->addRow("Name", new QLineEdit(patient["name"])); } groupBox->setLayout(layout); scrollArea->widget()->setLayout(_layout3);this->_layout3->addWidget(groupBox); 
 }@
