Resizing parent QLayout, and resizing QForm widget rows
-
Hello, kindly study this code and guide me on how I can increase the size of the parent widget. As you can see in one of the attached photos showing the gui, how can I enlarge the widget which is the scrollable area there?
Also, how can I increase the length and breadth of the widgets QLineEdit (rows) in the QFormLayout?
The codes below are extracts:
<>```
widget = QWidget()
#widget.setGeometry(100,100,700,500)
hbox = QHBoxLayout(widget)
gbox = QGroupBox()
vbox = QVBoxLayout()
glayt = QGridLayout()fbox = QFormLayout() fbox.setVerticalSpacing(20) fbox.setHorizontalSpacing(20) hbox.addLayout(glayt) hbox.addLayout(vbox) glayt.addWidget(gbox,1,2,1,2) gbox.setLayout(fbox)
-
Hello, kindly study this code and guide me on how I can increase the size of the parent widget. As you can see in one of the attached photos showing the gui, how can I enlarge the widget which is the scrollable area there?
Also, how can I increase the length and breadth of the widgets QLineEdit (rows) in the QFormLayout?
The codes below are extracts:
<>```
widget = QWidget()
#widget.setGeometry(100,100,700,500)
hbox = QHBoxLayout(widget)
gbox = QGroupBox()
vbox = QVBoxLayout()
glayt = QGridLayout()fbox = QFormLayout() fbox.setVerticalSpacing(20) fbox.setHorizontalSpacing(20) hbox.addLayout(glayt) hbox.addLayout(vbox) glayt.addWidget(gbox,1,2,1,2) gbox.setLayout(fbox)
@CEO Looks like "widget" wasn't added to any layout. Do you actually need it? registerTB is already a QWidget.
-
I actually was using self.setLayout(glayt) where glayt = QGridLayout()
but someone said I should use that widget = QWidget() and setting it to my scrollarea since I don't understand scrollArea that much. But it turns out not to give me what I expected and the person couldn't help further. So if you can guide me, I can also share with the person. -
To resolve it, I used a gridLayout as the parent widget, then I set the scrollArea widget to be resizable(True)
This makes everywhere in the gbox which I set as the scrollArea widget to be resizable. I ensured the other widgets are coded inside. I set the first layout, vbox to the gbox