[Qt-interest] Fixed size QSpacerItem does not get layout spacing?

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Mon Mar 1 08:17:49 CET 2010


Hi Everybody, 

I am using 4.6.0 on Win XP, VS 2008 rtm.  See attached minimal example and screen shot.  

I have started using a fixed size QSpacerItem in a grid layout.  I expected that the spacer item would be treated exactly the same as a widget or sub-layout, and that the grid would add its spacing to the spacer item.  This is certainly how it appears the spacers in designer work - since they visually do not include the layout spacing.  But to get things to line up, I have to add the grid spacing to the spacer item myself.  

I assume this a bug?  I tried searching task tracker for QSpacerItem, but none of the items matched.  In this scenario, if I changed the grid spacing, I would have to loop over and adjust any spacer items myself.  Yuk!

If not a bug, how do I get fixed size QSpacerItems to be treated the same as fixed size widgets? 

Regards, 

Tony.
 

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4903 (20100228) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spacer.png
Type: image/png
Size: 2136 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100301/6103c58c/attachment.png 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
Url: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100301/6103c58c/attachment.pl 


More information about the Qt-interest-old mailing list