Question: `Qt` has a flexible and powerful layout mechanism to handle view of desktop application's windows.

But it is so flexible, that it nearly cannot be understood, when something goes wrong and needs fine tuning. And so powerful, that it can beat anyone in their tries to overwhelm Qt's opinion of how form should look.

So, can anyone explain, or provide articles, or source of Qt's positioning mechanisms?

I'm trying to force the `QLabel`, `QPushButton` and `QTableView`, marked by trailing underscores in their names, be two times higher than `QTextBrowser` having `verticalStretch = 1` below. How can I handle widget's height properly?

[.ui file of my form on google docs. Search '\_\_\_\_' in names, preview in QtDesigner](https://docs.google.com/leaf?id=0B60otNVdbWrrZjk2MGZmZjUtOTRkNy00Yjc3LTliZjMtOTJiMThmNzk1YTZh&hl=en)

Answer: 
According to its [docs](https://doc.qt.io/qt-5/layout.html#adding-widgets-to-a-layout):

> 
> When you add widgets to a layout, the layout process works as follows:
> 
> 
> 1. All the widgets will initially be allocated an amount of space in accordance with their QWidget::sizePolicy() and QWidget::sizeHint().
> 2. If any of the widgets have stretch factors set, with a value greater than zero, then they are allocated space in proportion to their stretch factor (explained below).
> 3. If any of the widgets have stretch factors set to zero they will only get more space if no other widgets want the space. Of these, space is allocated to widgets with an Expanding size policy first.
> 4. Any widgets that are allocated less space than their minimum size (or minimum size hint if no minimum size is specified) are allocated this minimum size they require. (Widgets don't have to have a minimum size or minimum size hint in which case the stretch factor is their determining factor.)
> 5. Any widgets that are allocated more space than their maximum size are allocated the maximum size space they require. (Widgets do not have to have a maximum size in which case the stretch factor is their determining factor.)
> 
> 
> 

And `sizeHint()` is the recommended size of a QWidget, and the `Layout` of the widget parent will take `sizeHint()` and `sizePolicy()` into consideration to determine the space of the child widget can hold.
You can use QT Style Sheets to control the widgets height 
and other properties in an easy customizable way.

<http://doc.qt.io/archives/qt-4.7/stylesheet.html>

As for the layouts you need to use them wisely and strongly
coupled with spacers in order to make the widgets behave
exactly the way you want them to.

<http://doc.qt.io/archives/qt-4.7/designer-layouts.html>