[Qt-interest] Qt Layout Squashing

Dave Smith dave at thesmithfam.org
Tue Mar 9 18:19:56 CET 2010


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?

--Dave



More information about the Qt-interest-old mailing list