naturtag.widgets.layouts module¶
Source: * https://doc.qt.io/qtforpython/examples/example_widgets_layouts_flowlayout.html * Many hours of frustration
- class naturtag.widgets.layouts.FlowLayout(parent=None, spacing=0)¶
Bases:
LayoutMixin
,QLayout
- addItem(item)¶
- count(self) int ¶
- expandingDirections(self) PySide6.QtCore.Qt.Orientation ¶
- hasHeightForWidth(self) bool ¶
- heightForWidth(width)¶
- itemAt(index)¶
- Return type:
Optional
[QWidget
]
- maximumSize(self) PySide6.QtCore.QSize ¶
- minimumSize(self) PySide6.QtCore.QSize ¶
- preferredSize(constraint=None)¶
- setGeometry(rect)¶
- setSpacing(value)¶
- sizeHint(which=None, constraint=None)¶
- spacing()¶
- Return type:
float
- staticMetaObject = PySide6.QtCore.QMetaObject("FlowLayout" inherits "QLayout": )¶
- takeAt(index)¶
- Return type:
Optional
[QWidget
]
- class naturtag.widgets.layouts.GridLayout(parent=None, n_columns=None)¶
Bases:
LayoutMixin
,QGridLayout
- addWidget(self, w: PySide6.QtWidgets.QWidget) None ¶
- addWidget(self, arg__1: PySide6.QtWidgets.QWidget, row: int, column: int, alignment: PySide6.QtCore.Qt.AlignmentFlag = Default(Qt.Alignment)) None
- addWidget(self, arg__1: PySide6.QtWidgets.QWidget, row: int, column: int, rowSpan: int, columnSpan: int, alignment: PySide6.QtCore.Qt.AlignmentFlag = Default(Qt.Alignment)) None
- clear()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("GridLayout" inherits "QGridLayout": )¶
- class naturtag.widgets.layouts.GroupBoxLayout(name=None)¶
Bases:
QVBoxLayout
GroupBox with a default layout
- clear()¶
- set_title(title)¶
- staticMetaObject = PySide6.QtCore.QMetaObject("GroupBoxLayout" inherits "QVBoxLayout": )¶
- class naturtag.widgets.layouts.GroupMixin¶
Bases:
object
- add_group(name, parent=None, width=None, min_width=None, max_width=None, policy_min_height=True)¶
Add a new groupbox to the widget or layout
- Return type:
- class naturtag.widgets.layouts.HorizontalLayout¶
Bases:
LayoutMixin
,QHBoxLayout
- staticMetaObject = PySide6.QtCore.QMetaObject("HorizontalLayout" inherits "QHBoxLayout": )¶
- class naturtag.widgets.layouts.LayoutMixin¶
Bases:
GroupMixin
,ShortcutMixin
,object
Layout mixin with some extra convenience methods
- clear()¶
- property widgets: Iterator[QWidget]¶
- class naturtag.widgets.layouts.ShortcutMixin¶
Bases:
object
- add_shortcut(key_sequence, callback)¶
Add a keyboard shortcut to the widget or layout
- Return type:
QShortcut
- class naturtag.widgets.layouts.StylableWidget¶
Bases:
WidgetMixin
,QWidget
- staticMetaObject = PySide6.QtCore.QMetaObject("StylableWidget" inherits "QWidget": )¶
- class naturtag.widgets.layouts.StyleMixin¶
Bases:
object
- paintEvent(event)¶
Allow custom widgets to be styled with QSS
- class naturtag.widgets.layouts.VerticalLayout¶
Bases:
LayoutMixin
,QVBoxLayout
- staticMetaObject = PySide6.QtCore.QMetaObject("VerticalLayout" inherits "QVBoxLayout": )¶
- class naturtag.widgets.layouts.WidgetMixin¶
Bases:
GroupMixin
,StyleMixin
,ShortcutMixin
Layout mixin with some extra convenience methods