With PySide, I have a set of QWidget in a QVBoxLayout
vlayout = QVBoxLayout()
vlayout.addWidget(self.a_label)
vlayout.addWidget(self.a)
I can set the width of widget with
self.a.setFixedWidth(60)
but If I try set the width of QVBoxLayout
with setGeometry
vlayout.setGeometry(QRect(100, 100, 100, 100))
I don't get changes.
How I can set the width of a QVBoxLayout ?
I solved, putting the QVBoxLayout
in a QWidget
and fixed the width of QWidget
v_widget = QWidget()
v_widget.setLayout(vlayout)
v_widget.setFixedWidth(80)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With