PythonQt.QtGui.QLayout · declarations 002
Back to PythonQt.QtGui.QLayout
spacing
instance-attribute
spacing: int
Qt 5 reference:
spacing : int
This property holds the spacing between widgets inside the layout
If no value is explicitly set, the layout's spacing is inherited from the parent layout, or from the style settings for the parent widget.
For QGridLayout and QFormLayout, it is possible to set different horizontal and vertical spacings using setHorizontalSpacing() and setVerticalSpacing(). In that case, spacing() returns -1.
Access functions:
| int | spacing() const |
|---|---|
| void | setSpacing(int) |
See also contentsRect(), getContentsMargins(), QStyle::layoutSpacing(), and QStyle::pixelMetric().
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#spacing
takeAt
takeAt(index: int) -> Any
X.takeAt(index) -> PythonQt.QtGui.QLayoutItem
Supplemental documentation: Qt 5 reference:
[pure virtual] QLayoutItem *QLayout::takeAt(int index)
Must be implemented in subclasses to remove the layout item at index from the layout, and return the item. If there is no such item, the function must do nothing and return 0. Items are numbered consecutively from 0. If an item is removed, other items will be renumbered.
The following code fragment shows a safe way to remove all items from a layout:
QLayoutItem *child;
while ((child = layout->takeAt(0)) != nullptr) {
...
delete child->widget(); // delete the widget
delete child; // delete the layout item
}
See also itemAt() and count().
Upstream PySide2 reference signatures (binding differences may apply):
takeAt(self, index: int) -> PySide2.QtWidgets.QLayoutItem
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#takeAt
totalHeightForWidth
totalHeightForWidth(w: int) -> int
X.totalHeightForWidth(w) -> int
Upstream PySide2 reference signatures (binding differences may apply):
totalHeightForWidth(self, w: int) -> int
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#totalHeightForWidth
totalMaximumSize
totalMaximumSize() -> Any
X.totalMaximumSize() -> PythonQt.QtCore.QSize
Upstream PySide2 reference signatures (binding differences may apply):
totalMaximumSize(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#totalMaximumSize
totalMinimumSize
totalMinimumSize() -> Any
X.totalMinimumSize() -> PythonQt.QtCore.QSize
Upstream PySide2 reference signatures (binding differences may apply):
totalMinimumSize(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#totalMinimumSize
totalSizeHint
totalSizeHint() -> Any
X.totalSizeHint() -> PythonQt.QtCore.QSize
Upstream PySide2 reference signatures (binding differences may apply):
totalSizeHint(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#totalSizeHint
update
update() -> None
X.update()
Supplemental documentation: Qt 5 reference:
void QLayout::update()
Updates the layout for parentWidget().
You should generally not need to call this because it is automatically called at the most appropriate times.
See also activate() and invalidate().
Upstream PySide2 reference signatures (binding differences may apply):
update(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#update
widgetEvent
widgetEvent(arg__1: Any) -> None
X.widgetEvent(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
widgetEvent(self, arg__1: PySide2.QtCore.QEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlayout.html#widgetEvent