Hi Tony, Are you able to share the method/API call to set the minimum width ?
Cheers On Sun, 11 Jul 2021 at 18:12, Tony Rietwyk <t...@rightsoft.com.au> wrote: > Hi Nicholas, > > You could set a minimum width on them based on the expected width - don't > forget to set it back to 0 when you add their true content. > > Regards, Tony > > > On 12/07/2021 7:27 am, Nicholas Yue wrote: > > 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/ > > _______________________________________________ > Interest mailing > listInterest@qt-project.orghttps://lists.qt-project.org/listinfo/interest > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest > -- Nicholas Yue https://www.linkedin.com/in/nicholasyue/
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest