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: naturtag.widgets.layouts.LayoutMixin, PySide6.QtWidgets.QLayout

addItem(item)#
count(self) int#
expandingDirections(self) PySide6.QtCore.Qt.Orientations#
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: naturtag.widgets.layouts.LayoutMixin, PySide6.QtWidgets.QGridLayout

add_widget(item)#
clear()#
staticMetaObject = PySide6.QtCore.QMetaObject("GridLayout" inherits "QGridLayout": )#
class naturtag.widgets.layouts.GroupBoxLayout(name=None)#

Bases: PySide6.QtWidgets.QVBoxLayout

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_height=True)#

Add a new groupbox to the widget or layout

Return type

GroupBoxLayout

class naturtag.widgets.layouts.HorizontalLayout#

Bases: naturtag.widgets.layouts.LayoutMixin, PySide6.QtWidgets.QHBoxLayout

staticMetaObject = PySide6.QtCore.QMetaObject("HorizontalLayout" inherits "QHBoxLayout": )#
class naturtag.widgets.layouts.LayoutMixin#

Bases: naturtag.widgets.layouts.GroupMixin, naturtag.widgets.layouts.ShortcutMixin, object

Layout mixin with some extra convenience methods

clear()#
property widgets: Iterator[PySide6.QtWidgets.QWidget]#
Return type

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: naturtag.widgets.layouts.WidgetMixin, PySide6.QtWidgets.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: naturtag.widgets.layouts.LayoutMixin, PySide6.QtWidgets.QVBoxLayout

staticMetaObject = PySide6.QtCore.QMetaObject("VerticalLayout" inherits "QVBoxLayout": )#
class naturtag.widgets.layouts.WidgetMixin#

Bases: naturtag.widgets.layouts.GroupMixin, naturtag.widgets.layouts.StyleMixin, naturtag.widgets.layouts.ShortcutMixin

Layout mixin with some extra convenience methods