Skip to content

PythonQt.Qt.QLayout

QLayout

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

This is an abstract base class inherited by the concrete classes QBoxLayout, QGridLayout, QFormLayout, and QStackedLayout.

For users of QLayout subclasses or of QMainWindow there is seldom any need to use the basic functions provided by QLayout, such as setSizeConstraint() or setMenuBar(). See Layout Management for more information.

To make your own layout manager, implement the functions addItem(), sizeHint(), setGeometry(), itemAt() and takeAt(). You should also implement minimumSize() to ensure your layout isn't resized to zero size if there is too little space. To support children whose heights depend on their widths, implement hasHeightForWidth() and heightForWidth(). See the Border Layout and Flow Layout examples for more information about implementing custom layout managers.

Geometry management stops when the layout manager is deleted.

Source: https://doc.qt.io/archives/qt-5.15/qlayout.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
SetDefaultConstraint attribute Any (shared captured text)
SetFixedSize attribute Any (shared captured text)
SetMaximumSize attribute Any (shared captured text)
SetMinAndMaxSize attribute Any (shared captured text)
SetMinimumSize attribute Any (shared captured text)
SetNoConstraint attribute Any (shared captured text)
SizeConstraint attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
activate function (self) -> bool X.activate() -> bool (shared captured text)
addChildLayout function (self, l: Any) -> None This function is called from addLayout() or insertLayout() functions in subclasses to add layout l as a sub-layout. (shared captured text)
addChildWidget function (self, w: Any) -> None This function is called from addWidget() functions in subclasses to add w as a managed widget of a layout. (shared captured text)
addItem function (self, arg__1: Any) -> None Implemented in subclasses to add an item. (shared captured text)
addWidget function (self, w: Any) -> None Adds widget w to this layout in a manner specific to the layout. (shared captured text)
adoptLayout function (self, layout: Any) -> bool X.adoptLayout(layout) -> bool (shared captured text)
alignment function (self) -> Any (shared captured text)
alignmentRect function (self, arg__1: Any) -> Any X.alignmentRect(arg__1) -> PythonQt.QtCore.QRect (shared captured text)
blockSignals function (self, b: Any) -> bool X.blockSignals(b) -> bool (shared captured text)
childEvent function (self, e: Any) -> None Reimplements: [QObject::childEvent](https://doc.qt.io/archives/qt-5.15/qobject.html#childEvent)(QChildEvent *event). (shared captured text)
children function (self) -> tuple X.children() -> tuple (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
closestAcceptableSize function (self, w: Any, s: Any) -> Any X.closestAcceptableSize(w, s) -> PythonQt.QtCore.QSize (shared captured text)
connect function (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool X.connect(signal, receiver, slot, type) -> bool (shared captured text)
contentsMargins function (self) -> Any X.contentsMargins() -> PythonQt.QtGui.QMargins (shared captured text)
contentsRect function (self) -> Any X.contentsRect() -> PythonQt.QtCore.QRect (shared captured text)
controlTypes function (self) -> Any Reimplements: [QLayoutItem::controlTypes](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#controlTypes)() const. (shared captured text)
count function (self) -> int X.count() -> int (shared captured text)
customEvent function (self, event: Any) -> Any (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
deleteLater function (self) -> Any (shared captured text)
destroyed function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.Qt.QLayout.destroyed; argument details are not documented.
disconnect function (self, signal: Any, receiver: Any, slot: Any) -> bool X.disconnect(signal, receiver, slot) -> bool (shared captured text)
dumpObjectInfo function (self) -> Any (shared captured text)
dumpObjectTree function (self) -> Any (shared captured text)
dynamicPropertyNames function (self) -> Any (shared captured text)
event function (self, event: Any) -> bool X.event(event) -> bool (shared captured text)
eventFilter function (self, watched: Any, event: Any) -> bool X.eventFilter(watched, event) -> bool (shared captured text)
expandingDirections function (self) -> Any Reimplements: [QLayoutItem::expandingDirections](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#expandingDirections)() const. (shared captured text)
findChild function (self, type: Any, name: Any) -> Any X.findChild(type, name) -> PythonQt.private.QObject (shared captured text)
findChildren function (self, type: Any, name: Any) -> tuple X.findChildren(type, name) -> tuple (shared captured text)
geometry function (self) -> Any X.geometry() -> PythonQt.QtCore.QRect (shared captured text)
hasHeightForWidth function (self) -> bool X.hasHeightForWidth() -> bool (shared captured text)
heightForWidth function (self, arg__1: Any) -> int X.heightForWidth(arg__1) -> int (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
indexOf function (self, arg__1: Any) -> int X.indexOf(arg__1) -> int (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
installEventFilter function (self, filterObj: Any) -> Any (shared captured text)
invalidate function (self) -> None Reimplements: [QLayoutItem::invalidate](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#invalidate)(). (shared captured text)
isEmpty function (self) -> bool X.isEmpty() -> bool (shared captured text)
isEnabled function (self) -> bool X.isEnabled() -> bool (shared captured text)
isSignalConnected function (self, signal: Any) -> bool X.isSignalConnected(signal) -> bool (shared captured text)
isWidgetType function (self) -> bool X.isWidgetType() -> bool (shared captured text)
isWindowType function (self) -> bool X.isWindowType() -> bool (shared captured text)
itemAt function (self, index: int) -> Any X.itemAt(index) -> PythonQt.QtGui.QLayoutItem (shared captured text)
killTimer function (self, id: Any) -> Any (shared captured text)
layout function (self) -> Any X.layout() -> PythonQt.QtGui.QLayout (shared captured text)
margin attribute int (shared captured text)
maximumSize function (self) -> Any X.maximumSize() -> PythonQt.QtCore.QSize (shared captured text)
menuBar function (self) -> Any X.menuBar() -> PythonQt.QtGui.QWidget (shared captured text)
metaObject function (self) -> Any X.metaObject() -> PythonQt.QtCore.QMetaObject (shared captured text)
minimumHeightForWidth function (self, arg__1: Any) -> int X.minimumHeightForWidth(arg__1) -> int (shared captured text)
minimumSize function (self) -> Any X.minimumSize() -> PythonQt.QtCore.QSize (shared captured text)
moveToThread function (self, thread: Any) -> Any (shared captured text)
objectName attribute Any (shared captured text)
objectNameChanged function (self, *args: Any, **kwargs: Any) -> Any Native PythonQt.Qt.QLayout.objectNameChanged; argument details are not documented.
parent function (self) -> Any X.parent() -> PythonQt.private.QObject (shared captured text)
parentWidget function (self) -> Any X.parentWidget() -> PythonQt.QtGui.QWidget (shared captured text)
property function (self, name: Any) -> Any X.property(name) -> object (shared captured text)
removeEventFilter function (self, obj: Any) -> Any (shared captured text)
removeItem function (self, arg__1: Any) -> None Removes the layout item item from the layout. (shared captured text)
removeWidget function (self, w: Any) -> None Removes the widget widget from the layout. (shared captured text)
replaceWidget function (self, *args: Any, **kwargs: Any) -> Any X.replaceWidget(from, to, options) -> PythonQt.QtGui.QLayoutItem (shared captured text)
sender function (self) -> Any X.sender() -> PythonQt.private.QObject (shared captured text)
senderSignalIndex function (self) -> int X.senderSignalIndex() -> int (shared captured text)
setAlignment function (self, l: Any, alignment: Any) -> bool X.setAlignment(l, alignment) -> bool (shared captured text)
setContentsMargins function (self, left: Any, top: Any, right: Any, bottom: Any) -> None X.setContentsMargins(left, top, right, bottom) (shared captured text)
setEnabled function (self, arg__1: bool) -> None Enables this layout if enable is true, otherwise disables it. (shared captured text)
setGeometry function (self, arg__1: Any) -> None Reimplements: [QLayoutItem::setGeometry](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#setGeometry)(const QRect \&r). (shared captured text)
setMargin function (self, arg__1: int) -> None (shared captured text)
setMenuBar function (self, w: Any) -> None Tells the geometry manager to place the menu bar widget at the top of [parentWidget](https://doc.qt.io/archives/qt-5.15/qlayout.html#parentWidget)(), outside… (shared captured text)
setObjectName function (self, name: Any) -> Any (shared captured text)
setParent function (self, parent: Any) -> Any (shared captured text)
setProperty function (self, name: Any, value: Any) -> bool X.setProperty(name, value) -> bool (shared captured text)
setSizeConstraint function (self, arg__1: Any) -> None (shared captured text)
setSpacing function (self, arg__1: int) -> None (shared captured text)
signalsBlocked function (self) -> bool X.signalsBlocked() -> bool (shared captured text)
sizeConstraint attribute Any This property holds the resize mode of the layout (shared captured text)
sizeHint function (self) -> Any X.sizeHint() -> PythonQt.QtCore.QSize (shared captured text)
spacerItem function (self) -> Any X.spacerItem() -> PythonQt.QtGui.QSpacerItem (shared captured text)
spacing attribute int This property holds the spacing between widgets inside the layout (shared captured text)
startTimer function (self, interval: Any, timerType: Any) -> int X.startTimer(interval, timerType) -> int (shared captured text)
takeAt function (self, index: int) -> Any X.takeAt(index) -> PythonQt.QtGui.QLayoutItem (shared captured text)
thread function (self) -> Any (shared captured text)
timerEvent function (self, event: Any) -> Any (shared captured text)
totalHeightForWidth function (self, w: int) -> int X.totalHeightForWidth(w) -> int (shared captured text)
totalMaximumSize function (self) -> Any X.totalMaximumSize() -> PythonQt.QtCore.QSize (shared captured text)
totalMinimumSize function (self) -> Any X.totalMinimumSize() -> PythonQt.QtCore.QSize (shared captured text)
totalSizeHint function (self) -> Any X.totalSizeHint() -> PythonQt.QtCore.QSize (shared captured text)
tr function (self, text: Any, ambig: Any, n: Any) -> str X.tr(text, ambig, n) -> str (shared captured text)
update function (self) -> None Updates the layout for [parentWidget](https://doc.qt.io/archives/qt-5.15/qlayout.html#parentWidget)(). (shared captured text)
widget function (self) -> Any X.widget() -> PythonQt.QtGui.QWidget (shared captured text)
widgetEvent function (self, arg__1: Any) -> None (shared captured text)