Doh!   I assumed ui_inputs and ui_outputs were QWidgets, not QLayouts - sorry!

Try setStretch or setStretchFactor instead - unfortunately, my Qt Designer is broken, so I can't check those myself.

Regards, Tony

On 12/07/2021 12:26 pm, Nicholas Yue wrote:
Hi Tony,

  Are you able to share the method/API call to set the minimum width ?


On Sun, 11 Jul 2021 at 18:12, Tony Rietwyk < <>> 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:

    I have a horizontal layout, self.viewHorizontalLayout

    I am adding the following items

            # Inputs/View/Outputs panel
            self.ui_inputs = QtWidgets.QVBoxLayout()
            # inputs.addWidget(QPushButton('inputs'))

            self.ui_scene = QtWidgets.QGraphicsScene() # Object
    lifetime critical
            self.ui_view = QtWidgets.QGraphicsView(self.ui_scene)

            self.ui_outputs = QtWidgets.QVBoxLayout()
            # outputs.addWidget(QPushButton('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 ?

-- Nicholas Yue

    Interest mailing list  <>  
    Interest mailing list <>

Nicholas Yue <>
Interest mailing list

Reply via email to