ESpace Space
Examples
Pair gaps, wrapping and spacers
Space
Properties
alignmentstringAlignment of items along the cross axis.
"start" / "center""end" / "stretch"
"center"contentaliasContent slot; declare QML child objects directly inside the component.
Alias: body.datadirectionvarLayout direction of the child items.
Qt.Horizontal / Qt.Vertical"horizontal" / "vertical"
Qt.HorizontalenabledboolAllow interaction; false disables the control.
truefillboolMake space-container children fill the available space.
falsefillRatiorealPercentage of available width occupied by children in fill mode.
100heightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightlayoutHeightrealExplicit layout height; 0 computes it from content.
0sizevarSpacing between child items.
Non-negative number"small" / "default" / "large"
[horizontal gap, vertical gap]
12spacervarSeparator text or Component between children.
Text or Component
""spacingrealGap between content, columns, rows or text in pixels.
Dynamic bindingvisibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthwrapboolAllow content to wrap when space is insufficient.
trueflowintRead onlyWhether space uses wrapping layout.
Computed at runtimehorizontalboolRead onlyWhether the resolved layout is horizontal or vertical.
Computed at runtimehorizontalGaprealRead onlyActual horizontal or vertical layout gap.
Computed at runtimepositionsvarRead onlyPositions computed from child dimensions and layout rules.
Computed at runtimeverticalGaprealRead onlyActual horizontal or vertical layout gap.
Computed at runtime