Skip to content

PythonQt.QtGui.QLayoutItem

QLayoutItem

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

This is used by custom layouts.

Pure virtual functions are provided to return information about the layout, including, sizeHint(), minimumSize(), maximumSize() and expanding().

The layout's geometry can be set and retrieved with setGeometry() and geometry(), and its alignment with setAlignment() and alignment().

isEmpty() returns whether the layout item is empty. If the concrete item is a QWidget, it can be retrieved using widget(). Similarly for layout() and spacerItem().

Some layouts have width and height interdependencies. These can be expressed using hasHeightForWidth(), heightForWidth(), and minimumHeightForWidth(). For more explanation see the Qt Quarterly article Trading Height for Width.

Source: https://doc.qt.io/archives/qt-5.15/qlayoutitem.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
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
alignment function (self) -> Any Returns the alignment of this item.
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
controlTypes function (self) -> Any Returns the control type(s) for the layout item.
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
expandingDirections function (self) -> Any Returns whether this layout item can make use of more space than [sizeHint](https://doc.qt.io/archives/qt-5.15/qlayoutitem.html#sizeHint)().
geometry function (self) -> Any X.geometry() -> PythonQt.QtCore.QRect
hasHeightForWidth function (self) -> bool X.hasHeightForWidth() -> bool
heightForWidth function (self, arg__1: int) -> int X.heightForWidth(arg__1) -> int
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (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)
invalidate function (self) -> None Invalidates any cached information in this layout item.
isEmpty function (self) -> bool X.isEmpty() -> bool
layout function (self) -> Any X.layout() -> PythonQt.QtGui.QLayout
maximumSize function (self) -> Any X.maximumSize() -> PythonQt.QtCore.QSize
minimumHeightForWidth function (self, arg__1: int) -> int X.minimumHeightForWidth(arg__1) -> int
minimumSize function (self) -> Any X.minimumSize() -> PythonQt.QtCore.QSize
setAlignment function (self, a: Any) -> None Sets the alignment of this item to alignment.
setGeometry function (self, arg__1: Any) -> None Implemented in subclasses to set this item's geometry to r.
sizeHint function (self) -> Any X.sizeHint() -> PythonQt.QtCore.QSize
spacerItem function (self) -> Any X.spacerItem() -> PythonQt.QtGui.QSpacerItem
widget function (self) -> Any X.widget() -> PythonQt.QtGui.QWidget