Skip to content

PythonQt.QtGui.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
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.
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.
addItem function (self, arg__1: Any) -> None Implemented in subclasses to add an item.
addWidget function (self, w: Any) -> None Adds widget w to this layout in a manner specific to the layout.
adoptLayout function (self, layout: Any) -> bool X.adoptLayout(layout) -> bool
alignment function (self) -> Any (shared captured text)
alignmentRect function (self, arg__1: Any) -> Any X.alignmentRect(arg__1) -> PythonQt.QtCore.QRect
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).
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
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
contentsRect function (self) -> Any X.contentsRect() -> PythonQt.QtCore.QRect
controlTypes function (self) -> Any Reimplements: [QLayoutItem::controlTypes](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#controlTypes)() const.
count function (self) -> int X.count() -> int
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.QtGui.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.
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
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
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)().
isEmpty function (self) -> bool X.isEmpty() -> bool
isEnabled function (self) -> bool X.isEnabled() -> bool
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
killTimer function (self, id: Any) -> Any (shared captured text)
layout function (self) -> Any X.layout() -> PythonQt.QtGui.QLayout
margin attribute int
maximumSize function (self) -> Any X.maximumSize() -> PythonQt.QtCore.QSize
menuBar function (self) -> Any X.menuBar() -> PythonQt.QtGui.QWidget
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
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.QtGui.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
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.
removeWidget function (self, w: Any) -> None Removes the widget widget from the layout.
replaceWidget function (self, *args: Any, **kwargs: Any) -> Any X.replaceWidget(from, to, options) -> PythonQt.QtGui.QLayoutItem
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
setContentsMargins function (self, left: Any, top: Any, right: Any, bottom: Any) -> None X.setContentsMargins(left, top, right, bottom)
setEnabled function (self, arg__1: bool) -> None Enables this layout if enable is true, otherwise disables it.
setGeometry function (self, arg__1: Any) -> None Reimplements: [QLayoutItem::setGeometry](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#setGeometry)(const QRect \&r).
setMargin function (self, arg__1: int) -> None
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…
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
setSpacing function (self, arg__1: int) -> None
signalsBlocked function (self) -> bool X.signalsBlocked() -> bool (shared captured text)
sizeConstraint attribute Any This property holds the resize mode of the layout
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
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
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
totalMaximumSize function (self) -> Any X.totalMaximumSize() -> PythonQt.QtCore.QSize
totalMinimumSize function (self) -> Any X.totalMinimumSize() -> PythonQt.QtCore.QSize
totalSizeHint function (self) -> Any X.totalSizeHint() -> PythonQt.QtCore.QSize
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)().
widget function (self) -> Any X.widget() -> PythonQt.QtGui.QWidget (shared captured text)
widgetEvent function (self, arg__1: Any) -> None