Calling QGraphicsLinearLayout.setMinimumWidth() breaks further geometry computation
Unsolved
Qt for Python
-
Hi,
in my program, I useQGraphicsLinearLayout.setMinimumWidth()
to ensure that its width does not fall below a certain value. However, if I add new stuff to this layout afterward, the layout does not horizontally resize anymore, it stays narrow. It never does on its own, but callingself.layout.invalidate() self.layout.activate()
did the trick so far. (although according to the documentation, it should not be necessary to call both, but whatever)
How can I force the layout to recompute its minimum width?
Thanks for answers! -
self.layouts_parent_widget.adjustSize()
seems to do the trick in this case... I am a little confused, though, because it doesn't in a slightly different situation and I couldn't find out what differs yet, but regarding the issue described above, this seems to work