[Qt-interest] how do I Remove the Stretch item in a QVBoxLayout?

S. Aguinaga sa_jr at yahoo.com
Wed Sep 23 18:46:43 CEST 2009



Hello Fellows:

I have a QVBoxLayout that has some widget and ends with myVLayout->addStretch(1);  One of the widgets on this layout is a comboBox, so depending on what is selected on the combo box, I need to re-layout the VBox, but when I can't seem to find a way to removeItem or removeWidget for this "Stretch" item, so when I add new widgets to this layout, They appear at the bottom of the VBoxLayout (see below):

+------------------+
|  widget 1        |  
|  widget 2        |
|        /\        |
|        ||        |
|     stretch      |
|        ||        |
|        \/        |
|    new widget    |
+------------------+

How do I remove the stretch only?

// Salvador


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090923/620d3d60/attachment.html 


More information about the Qt-interest-old mailing list