[Qt-interest] Qt Layout Squashing

Dave Smith dave at thesmithfam.org
Wed Mar 10 19:45:18 CET 2010


Dave Smith wrote:
> Ian Thomson wrote:
>   > Turns out QStackedLayout always returns false for hasHeightForWidth
>> because it inherits it from QLayoutItem which has that default behaviour.
>>
>> http://doc.trolltech.com/4.6/qlayoutitem.html#hasHeightForWidth
>>
>> So I guess that means QStackedLayout does not support height for width. 
>> Other layout types (e.g. QBoxLayout) do have this reimplemented.
> 
> Bummer. At least this corroborates my findings. The behavior is specific 
> to QStackedWidget (due to its use of QStackedLayout).
> 
> Is this perhaps a bug? Or is this the intended behavior? Why would 
> QStackedLayout behave differently from QBoxLayout in this respect?

Any suggestions on how to fix this? The more I look at it, the more I 
consider this a bug.

--Dave



More information about the Qt-interest-old mailing list