PythonQt.QtGui.QSizePolicy · declarations 001
Back to PythonQt.QtGui.QSizePolicy
ButtonBox
instance-attribute
ButtonBox: Any
CheckBox
instance-attribute
CheckBox: Any
ComboBox
instance-attribute
ComboBox: Any
ControlType
instance-attribute
ControlType: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
ControlTypes
instance-attribute
ControlTypes: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
DefaultType
instance-attribute
DefaultType: Any
ExpandFlag
instance-attribute
ExpandFlag: Any
Expanding
instance-attribute
Expanding: Any
Frame
instance-attribute
Frame: Any
GroupBox
instance-attribute
GroupBox: Any
GrowFlag
instance-attribute
GrowFlag: Any
IgnoreFlag
instance-attribute
IgnoreFlag: Any
Ignored
instance-attribute
Ignored: Any
Label
instance-attribute
Label: Any
LineEdit
instance-attribute
LineEdit: Any
Maximum
instance-attribute
Maximum: Any
Minimum
instance-attribute
Minimum: Any
MinimumExpanding
instance-attribute
MinimumExpanding: Any
Policy
instance-attribute
Policy: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
PolicyFlag
instance-attribute
PolicyFlag: type
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.
int('0b100', base=0) 4
Preferred
instance-attribute
Preferred: Any
PushButton
instance-attribute
PushButton: Any
RadioButton
instance-attribute
RadioButton: Any
ShrinkFlag
instance-attribute
ShrinkFlag: Any
Slider
instance-attribute
Slider: Any
SpinBox
instance-attribute
SpinBox: Any
TabWidget
instance-attribute
TabWidget: Any
ToolButton
instance-attribute
ToolButton: Any
controlType
controlType() -> Any
X.controlType()
Supplemental documentation: Qt 5 reference:
QSizePolicy::ControlType QSizePolicy::controlType() const
Returns the control type associated with the widget for which this size policy applies.
This function was introduced in Qt 4.3.
See also setControlType().
Upstream PySide2 reference signatures (binding differences may apply):
controlType(self) -> PySide2.QtWidgets.QSizePolicy.ControlType
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#controlType
expandingDirections
expandingDirections() -> Any
X.expandingDirections()
Supplemental documentation: Qt 5 reference:
Qt::Orientations QSizePolicy::expandingDirections() const
Returns whether a widget can make use of more space than the QWidget::sizeHint() function indicates.
A value of Qt::Horizontal or Qt::Vertical means that the widget can grow horizontally or vertically (i.e., the horizontal or vertical policy is Expanding or MinimumExpanding), whereas Qt::Horizontal | Qt::Vertical means that it can grow in both dimensions.
See also horizontalPolicy() and verticalPolicy().
Upstream PySide2 reference signatures (binding differences may apply):
expandingDirections(self) -> PySide2.QtCore.Qt.Orientations
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#expandingDirections
hasHeightForWidth
hasHeightForWidth() -> bool
X.hasHeightForWidth() -> bool
Supplemental documentation: Qt 5 reference:
bool QSizePolicy::hasHeightForWidth() const
Returns true if the widget's preferred height depends on its width; otherwise returns
false.
See also setHeightForWidth().
Upstream PySide2 reference signatures (binding differences may apply):
hasHeightForWidth(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#hasHeightForWidth
hasWidthForHeight
hasWidthForHeight() -> bool
X.hasWidthForHeight() -> bool
Supplemental documentation: Qt 5 reference:
bool QSizePolicy::hasWidthForHeight() const
Returns true if the widget's width depends on its height; otherwise returns false.
See also setWidthForHeight().
Upstream PySide2 reference signatures (binding differences may apply):
hasWidthForHeight(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#hasWidthForHeight
horizontalPolicy
horizontalPolicy() -> Any
X.horizontalPolicy()
Supplemental documentation: Qt 5 reference:
QSizePolicy::Policy QSizePolicy::horizontalPolicy() const
Returns the horizontal component of the size policy.
See also setHorizontalPolicy(), verticalPolicy(), and horizontalStretch().
Upstream PySide2 reference signatures (binding differences may apply):
horizontalPolicy(self) -> PySide2.QtWidgets.QSizePolicy.Policy
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#horizontalPolicy
horizontalStretch
horizontalStretch() -> int
X.horizontalStretch() -> int
Supplemental documentation: Qt 5 reference:
int QSizePolicy::horizontalStretch() const
Returns the horizontal stretch factor of the size policy.
See also setHorizontalStretch(), verticalStretch(), and horizontalPolicy().
Upstream PySide2 reference signatures (binding differences may apply):
horizontalStretch(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#horizontalStretch
retainSizeWhenHidden
retainSizeWhenHidden() -> bool
X.retainSizeWhenHidden() -> bool
Supplemental documentation: Qt 5 reference:
bool QSizePolicy::retainSizeWhenHidden() const
Returns whether the layout should retain the widget's size when it is hidden. This is
false by default.
This function was introduced in Qt 5.2.
See also setRetainSizeWhenHidden().
Upstream PySide2 reference signatures (binding differences may apply):
retainSizeWhenHidden(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#retainSizeWhenHidden
setControlType
setControlType(type: Any) -> None
X.setControlType(type)
Supplemental documentation: Qt 5 reference:
void QSizePolicy::setControlType(QSizePolicy::ControlType type)
Sets the control type associated with the widget for which this size policy applies to type.
The control type specifies the type of the widget for which this size policy applies. It is used by some styles, notably QMacStyle, to insert proper spacing between widgets. For example, the macOS Aqua guidelines specify that push buttons should be separated by 12 pixels, whereas vertically stacked radio buttons only require 6 pixels.
This function was introduced in Qt 4.3.
See also controlType() and QStyle::layoutSpacing().
Upstream PySide2 reference signatures (binding differences may apply):
setControlType(self, type: PySide2.QtWidgets.QSizePolicy.ControlType) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setControlType
setHeightForWidth
setHeightForWidth(b: bool) -> None
X.setHeightForWidth(b)
Supplemental documentation: Qt 5 reference:
void QSizePolicy::setHeightForWidth(bool dependent)
Sets the flag determining whether the widget's preferred height depends on its width, to dependent.
See also hasHeightForWidth() and setWidthForHeight().
Upstream PySide2 reference signatures (binding differences may apply):
setHeightForWidth(self, b: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setHeightForWidth
setHorizontalPolicy
setHorizontalPolicy(d: Any) -> None
X.setHorizontalPolicy(d)
Supplemental documentation: Qt 5 reference:
void QSizePolicy::setHorizontalPolicy(QSizePolicy::Policy policy)
Sets the horizontal component to the given policy.
See also horizontalPolicy(), setVerticalPolicy(), and setHorizontalStretch().
Upstream PySide2 reference signatures (binding differences may apply):
setHorizontalPolicy(self, d: PySide2.QtWidgets.QSizePolicy.Policy) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setHorizontalPolicy
setHorizontalStretch
setHorizontalStretch(stretchFactor: int) -> None
X.setHorizontalStretch(stretchFactor)
Supplemental documentation: Qt 5 reference:
void QSizePolicy::setHorizontalStretch(int stretchFactor)
Sets the horizontal 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 horizontal layout, setting the horizontal stretch factor of the widget on the left to 2 and the factor of widget on the right to 1 will ensure that the widget on the left will always be twice the size of the one on the right.
See also horizontalStretch(), setVerticalStretch(), and setHorizontalPolicy().
Upstream PySide2 reference signatures (binding differences may apply):
setHorizontalStretch(self, stretchFactor: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setHorizontalStretch
setRetainSizeWhenHidden
setRetainSizeWhenHidden(retainSize: bool) -> None
X.setRetainSizeWhenHidden(retainSize)
Supplemental documentation: Qt 5 reference:
void QSizePolicy::setRetainSizeWhenHidden(bool retainSize)
Sets whether a layout should retain the widget's size when it is hidden. If retainSize
is true, the layout will not be changed by hiding the widget.
This function was introduced in Qt 5.2.
See also retainSizeWhenHidden().
Upstream PySide2 reference signatures (binding differences may apply):
setRetainSizeWhenHidden(self, retainSize: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsizepolicy.html#setRetainSizeWhenHidden