edifice.TableGridView#
- class edifice.TableGridView(row_stretch=(), column_stretch=(), row_minheight=(), column_minwidth=(), **kwargs)[source]#
Bases:
QtWidgetElement[QWidget]Table-style grid layout displays its children as aligned rows of columns.
Underlying Qt Widget QWidget
Underlying Qt Layout QGridLayout
This component has similar behavior to an HTML table. Each column will be the width of its widest child. Each row will be the height of its tallest child.
Props
All props for
QtWidgetElementplus:- Parameters:
row_stretch (
tuple[int,...]) – nth row stretch size in proportion to the nthintin this list. See setRowStretchcolumn_stretch (
tuple[int,...]) – nth column stretch size in proportion to the nthintin this list. See setColumnStretchrow_minheight (
tuple[int,...]) – nth row minimum height is the nthintin this list. See setRowMinimumHeightcolumn_minwidth (
tuple[int,...]) – nth column minimum width is the nthintin this list. See setColumnMinimumWidth
Usage
The only type of child
Elementallowed in aTableGridViewisTableGridRow. EachTableGridRowestablishes a row in the table, and may have children of any type ofElement.with TableGridView(): with TableGridRow(): Label(text="row 0 column 0") Label(text="row 0 column 1") with TableGridRow(): Label(text="row 1 column 0") with VBoxView(): Label(text="row 1 column 1")
If the
TableGridRows are added and removed dynamically then it’s a good idea toElement.set_key()each row.Methods
__init__([row_stretch, column_stretch, ...])register_ref(reference)Registers provided
Referenceto this Element.set_key(key)Set the key of an
Element.Attributes
childrenThe children of this Element.
propsThe props of this Element.
underlyingThe underlying QWidget, which may not exist if this Element has not rendered.