[Qt-interest] Qt Layout Squashing

Bartosh Wroblevksy bartosh at live.com
Tue Mar 9 18:21:44 CET 2010


May be totally coucou here but it sounds like this fix 
http://qt.gitorious.org/qt/qt/merge_requests/2298
deals with the issue. I could be wrong though 

> Date: Tue, 9 Mar 2010 17:13:55 +0000
> From: Ian.Thomson at iongeo.com
> To: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] Qt Layout Squashing
> 
> Hi,
> 
> 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.
> 
> Probably not the answer you wanted. You can probably get around this by 
> inheriting from QStackedLayout and implementing it.
> 
> Cheers,
> Ian.
> 
> Dave Smith wrote:
> > Ian Thomson wrote:
> >> I vaguely remember reading something in the documentation about this, 
> >> but I'm having trouble finding it now. It was something along the 
> >> lines of when you use QWidget::heightForWidth, it can disable the 
> >> minimum size constraints for the entire layout structure that contains 
> >> the label. A multi-line label uses this function and can cause this 
> >> effect.
> > 
> > That sounds like a good place to look, but why does it work when the 
> > label is not in a QStackedWidget, and breaks when it is inside a 
> > QStackedWidget?
> > 
> > I also tried placing the two QLabels in a QFrame (instead of a 
> > QStackedWidget), and the problem does not appear.
> > 
> > --Dave
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
 		 	   		  
_________________________________________________________________
Take your contacts everywhere
http://go.microsoft.com/?linkid=9712959
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100309/af06a95c/attachment.html 


More information about the Qt-interest-old mailing list