Skip to content

PythonQt.QtGui.QSizePolicy · declarations 002

Back to PythonQt.QtGui.QSizePolicy

setVerticalPolicy

setVerticalPolicy(d: Any) -> None

X.setVerticalPolicy(d)

Supplemental documentation: Qt 5 reference:

void QSizePolicy::setVerticalPolicy(QSizePolicy::Policy policy)

Sets the vertical component to the given policy.

See also verticalPolicy(), setHorizontalPolicy(), and setVerticalStretch().

Upstream PySide2 reference signatures (binding differences may apply):

setVerticalPolicy(self, d: PySide2.QtWidgets.QSizePolicy.Policy) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setVerticalPolicy

setVerticalStretch

setVerticalStretch(stretchFactor: int) -> None

X.setVerticalStretch(stretchFactor)

Supplemental documentation: Qt 5 reference:

void QSizePolicy::setVerticalStretch(int stretchFactor)

Sets the vertical stretch factor of the size policy to the given stretchFactor. stretchFactor must be in the range [0,255].

When two widgets are adjacent to each other in a vertical layout, setting the vertical stretch factor of the widget on the top to 2 and the factor of widget on the bottom to 1 will ensure that the widget on the top will always be twice the size of the one on the bottom.

See also verticalStretch(), setHorizontalStretch(), and setVerticalPolicy().

Upstream PySide2 reference signatures (binding differences may apply):

setVerticalStretch(self, stretchFactor: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setVerticalStretch

setWidthForHeight

setWidthForHeight(b: bool) -> None

X.setWidthForHeight(b)

Supplemental documentation: Qt 5 reference:

void QSizePolicy::setWidthForHeight(bool dependent)

Sets the flag determining whether the widget's width depends on its height, to dependent.

This is only supported for QGraphicsLayout's subclasses. It is not possible to have a layout with both height-for-width and width-for-height constraints at the same time.

See also hasWidthForHeight() and setHeightForWidth().

Upstream PySide2 reference signatures (binding differences may apply):

setWidthForHeight(self, b: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setWidthForHeight

transpose

transpose() -> None

X.transpose()

Supplemental documentation: Qt 5 reference:

void QSizePolicy::transpose()

Swaps the horizontal and vertical policies and stretches.

See also transposed().

Upstream PySide2 reference signatures (binding differences may apply):

transpose(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#transpose

verticalPolicy

verticalPolicy() -> Any

X.verticalPolicy()

Supplemental documentation: Qt 5 reference:

QSizePolicy::Policy QSizePolicy::verticalPolicy() const

Returns the vertical component of the size policy.

See also setVerticalPolicy(), horizontalPolicy(), and verticalStretch().

Upstream PySide2 reference signatures (binding differences may apply):

verticalPolicy(self) -> PySide2.QtWidgets.QSizePolicy.Policy

Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#verticalPolicy

verticalStretch

verticalStretch() -> int

X.verticalStretch() -> int

Supplemental documentation: Qt 5 reference:

int QSizePolicy::verticalStretch() const

Returns the vertical stretch factor of the size policy.

See also setVerticalStretch(), horizontalStretch(), and verticalPolicy().

Upstream PySide2 reference signatures (binding differences may apply):

verticalStretch(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#verticalStretch