[Interest] PySide2 : QHBoxLayout content sizing
Nicholas Yue
yue.nicholas at gmail.com
Sun Jul 11 23:27:35 CEST 2021
Hi,
I have a horizontal layout, self.viewHorizontalLayout
I am adding the following items
# Inputs/View/Outputs panel
self.ui_inputs = QtWidgets.QVBoxLayout()
self.ui_inputs.addStretch(1)
# inputs.addWidget(QPushButton('inputs'))
self.viewHorizontalLayout.addLayout(self.ui_inputs)
self.ui_scene = QtWidgets.QGraphicsScene() # Object lifetime
critical
self.ui_view = QtWidgets.QGraphicsView(self.ui_scene)
self.viewHorizontalLayout.addWidget(self.ui_view)
self.ui_outputs = QtWidgets.QVBoxLayout()
# outputs.addWidget(QPushButton('outputs'))
self.viewHorizontalLayout.addLayout(self.ui_outputs)
As self.ui_inputs and self.ui_outputs are initially empty, self.ui_view
occupies the entire self.viewHorizontalLayout
Is there some hints/size/stretch I can set on self.ui_inputs and
self.ui_outputs so that later on, when I do add items to them, it does not
pop in size to accommodate the additional content ?
Cheers
--
Nicholas Yue
https://www.linkedin.com/in/nicholasyue/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210711/161395c2/attachment.html>
More information about the Interest
mailing list