[Solved] Qt Python Question on layouts & expanding
-
Hi,
I'm trying to have my dialog expand and unexpand accordingly when pressing a pushButton like below:
!http://ptgmedia.pearsoncmg.com/images/chap02_9780132354165/elementLinks/02fig11.jpg(expand)!
I have added spacers & adjusted my layout. I also added this piece of python code:
@widget.layout().setSizeConstraint(QtGui.QLayout.SetFixedSize)@
but it seems to crash with this line of code. Anyone see any mistake with it?
I am able to do this in c++:
@layout()->setSizeConstraint(QLayout::SetFixedSize);@
Thanks!!
-
Code was correct. I just constructed my layout incorrectly.
Thanks!!
(Can close thread)