How QSizePolicy work? <p>From <a href="http://doc.qt.io/qt-4.8/qsizepolicy.html" rel="nofollow noreferrer">qt</a></p> <blockquote> <p>QSizePolicy::Minimum <strong>The sizeHint() is minimal</strong>, and sufficient. The widget can be expanded, but there is no advantage to it being larger (e.g. the horizontal direction of a push button). <strong>It cannot be smaller than the size provided by sizeHint().</strong></p> </blockquote> <p>But what we have?</p> <p><a href="https://i.stack.imgur.com/wgIqw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wgIqw.jpg" alt="img"></a></p> <p>Both QPushButton size are smaller than the size provided by its sizeHint(). Both QPushButton have horizontal SizePolicy set to Minimum and QGridLayout have layoutConstraint set to SetDefaultConstraint. Why am I seeing this result?</p> <p>XML part of code</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;ui version="4.0"&gt; &lt;class&gt;Widget&lt;/class&gt; &lt;widget class="QWidget" name="Widget"&gt; &lt;property name="enabled"&gt; &lt;bool&gt;true&lt;/bool&gt; &lt;/property&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;0&lt;/x&gt; &lt;y&gt;0&lt;/y&gt; &lt;width&gt;175&lt;/width&gt; &lt;height&gt;41&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="sizePolicy"&gt; &lt;sizepolicy hsizetype="Preferred" vsizetype="Preferred"&gt; &lt;horstretch&gt;0&lt;/horstretch&gt; &lt;verstretch&gt;0&lt;/verstretch&gt; &lt;/sizepolicy&gt; &lt;/property&gt; &lt;property name="minimumSize"&gt; &lt;size&gt; &lt;width&gt;100&lt;/width&gt; &lt;height&gt;0&lt;/height&gt; &lt;/size&gt; &lt;/property&gt; &lt;property name="sizeIncrement"&gt; &lt;size&gt; &lt;width&gt;0&lt;/width&gt; &lt;height&gt;300&lt;/height&gt; &lt;/size&gt; &lt;/property&gt; &lt;property name="windowTitle"&gt; &lt;string&gt;Form&lt;/string&gt; &lt;/property&gt; &lt;layout class="QHBoxLayout" name="horizontalLayout"&gt; &lt;property name="sizeConstraint"&gt; &lt;enum&gt;QLayout::SetDefaultConstraint&lt;/enum&gt; &lt;/property&gt; &lt;property name="leftMargin"&gt; &lt;number&gt;14&lt;/number&gt; &lt;/property&gt; &lt;item&gt; &lt;widget class="QPushButton" name="pushButton"&gt; &lt;property name="sizePolicy"&gt; &lt;sizepolicy hsizetype="Minimum" vsizetype="Minimum"&gt; &lt;horstretch&gt;0&lt;/horstretch&gt; &lt;verstretch&gt;0&lt;/verstretch&gt; &lt;/sizepolicy&gt; &lt;/property&gt; &lt;property name="layoutDirection"&gt; &lt;enum&gt;Qt::LeftToRight&lt;/enum&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Minimum&lt;/string&gt; &lt;/property&gt; &lt;property name="checkable"&gt; &lt;bool&gt;false&lt;/bool&gt; &lt;/property&gt; &lt;property name="autoDefault"&gt; &lt;bool&gt;false&lt;/bool&gt; &lt;/property&gt; &lt;property name="default"&gt; &lt;bool&gt;false&lt;/bool&gt; &lt;/property&gt; &lt;property name="flat"&gt; &lt;bool&gt;false&lt;/bool&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/item&gt; &lt;item&gt; &lt;widget class="QPushButton" name="pushButton_3"&gt; &lt;property name="sizePolicy"&gt; &lt;sizepolicy hsizetype="Minimum" vsizetype="Minimum"&gt; &lt;horstretch&gt;0&lt;/horstretch&gt; &lt;verstretch&gt;0&lt;/verstretch&gt; &lt;/sizepolicy&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Expanding&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/item&gt; &lt;/layout&gt; &lt;/widget&gt; &lt;resources/&gt; &lt;connections/&gt; &lt;/ui&gt; </code></pre>