[Interest] Custom layouts

2014-08-05 Thread Igor Mironchik
Hi. I found that if in setGeometry() method call hide() or show() on widgets inside layout then this leads to recursion of layout. What do you think on this problem? May be it is good suggestion to Qt developers to remove this recursion, because of it is sometimes useful to hide some widgets

Re: [Interest] Custom layouts

2014-08-05 Thread Tony Rietwyk
Hi Igor, Your problem makes sense. Hiding and showing widgets triggers a layout recalculation, and the layout uses setGeometry to position the widgets. It sounds unusual to change widget visibility in a setGeometry override. I suggest to use a flag to prevent the recursion yourself.