magneticalc.QtWidgets2.QLayouted.QLayouted

# ``magneticalc`.`QtWidgets2`.`QLayouted`.`QLayouted``

class documentation

`class QLayouted:`

Known subclasses: `magneticalc.QtWidgets2.QDialog2.QDialog2`, `magneticalc.QtWidgets2.QGroupBox2.QGroupBox2`

Constructor: `QLayouted(direction)`

View In Hierarchy

QLayouted class.

Method | `__init__` | Initializes the QLayouted class. This adds a layout and several related functions like addWidget() to the parent class.
Method | `addButtons` | Adds buttons.
Method | `addLayout` | Adds layout.
Method | `addSpacing` | Adds spacing.
Method | `addWidget` | Adds widget.
Method | `install_layout` | Installs this layout in the parent.
Instance Variable | `_layout` | Undocumented

def __init__(self, direction: `str` = 'vertical'):
overridden in `magneticalc.QtWidgets2.QDialog2.QDialog2`, `magneticalc.QtWidgets2.QGroupBox2.QGroupBox2`

Initializes the QLayouted class. This adds a layout and several related functions like addWidget() to the parent class.

Parameters
direction: `str` | Sets "vertical" or "horizontal" layout

def addButtons(self, data: `dict[str, tuple[str, Callable]]`) -> `dict[int, QPushButton]`:

Adds buttons.

Parameters
data: `dict[str, tuple[str, Callable]]` | Dictionary {text: (icon, callback), …}

Returns
`dict[int, QPushButton]` | Dictionary {index: QPushButton, …}

def addLayout(self, layout: `QLayout`):

Adds layout.

Parameters
layout: `QLayout` | QLayout

def addSpacing(self, spacing: `int`):

Adds spacing.

Parameters
spacing: `int` | Spacing value

def addWidget(self, widget, alignment: `Qt.Alignment | Qt.AlignmentFlag | None` = None):

Adds widget.

Parameters
widget | QWidget
alignment: `Qt.Alignment | Qt.AlignmentFlag | None` | Alignment

def install_layout(self, parent: `QWidget`):

Installs this layout in the parent.

_layout =

Undocumented