Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to look into <a href="http://qt-project.org/doc/qt-4.8/layout.html" rel="nofollow noreferrer">Qt's layout system</a> - using layouts will handle automatically resizing your objects based on the size of their parent.</p> <p>A combination of using <a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#sizePolicy-prop" rel="nofollow noreferrer"><code>QWidget::setSizePolicy()</code></a> and <a href="http://qt-project.org/doc/qt-5.0/qtwidgets/qboxlayout.html#setStretch" rel="nofollow noreferrer"><code>QBoxLayout::setStretch()</code></a> (or more likely <code>QBoxLayout::insertWidget(..., int stretch = 0, ...)</code>) will allow you to acheive the behaviour you refer to where only certain objects expand to fill available space, while others remain a constant size.</p> <p><strong>Addressing the image you've given above as an example:</strong></p> <p><img src="https://i.stack.imgur.com/1IVa1.png" alt="Example of solution in QtDesigner"></p> <p>Aside from dragging and dropping objects into the form, to achieve this solution I have:</p> <ul> <li>Set the vertical <code>sizePolicy</code> of <code>textEdit</code> to <code>Fixed</code>.</li> <li>Set a height in <code>textEdit</code>'s <code>minimumSize</code> for the <code>sizePolicy</code> to use.</li> <li>Set <code>layoutStretch</code> in <code>centralWidget</code> to <code>1,0</code>, i.e. assign the minimum possible space for the elements contained in <code>horizontalLayout</code> and give any remaining space to <code>tableWidget</code>.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload