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 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.
The only type of child
Element
allowed in aTableGridView
isTableGridRow
. EachTableGridRow
establishes 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
TableGridRow
s are added and removed dynamically then it’s a good idea toElement.set_key()
each row.- Parameters:
row_stretch (
tuple
[int
,...
]) – nth row stretch size in proportion to the nthint
in this list. See setRowStretchcolumn_stretch (
tuple
[int
,...
]) – nth column stretch size in proportion to the nthint
in this list. See setColumnStretchrow_minheight (
tuple
[int
,...
]) – nth row minimum height is the nthint
in this list. See setRowMinimumHeightcolumn_minwidth (
tuple
[int
,...
]) – nth column minimum width is the nthint
in this list. See setColumnMinimumWidth
Methods
__init__
([row_stretch, column_stretch, ...])register_ref
(reference)Registers provided
Reference
to this Element.set_key
(key)Set the key of an
Element
.Attributes
children
The children of this Element.
props
The props of this Element.
underlying
The underlying QWidget, which may not exist if this Element has not rendered.