Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

pi/agent/skills/optional/qml/examples/03-anchors/README.md

Raw
Rendered preview

03: Anchors

Anchors express positional relationships between items.

qml6 anchors.qml

Anchoring one edge positions that edge. Anchoring both horizontal edges also determines width, and anchoring both vertical edges also determines height. anchors.centerIn determines position while leaving explicit width and height valid.

Do not give one axis competing owners. Use a Qt Quick Layout for repeated row, column, or grid structure.

# 03: Anchors

Anchors express positional relationships between items.

```sh
qml6 anchors.qml
```

Anchoring one edge positions that edge.
Anchoring both horizontal edges also determines width, and anchoring both vertical edges also determines height.
`anchors.centerIn` determines position while leaving explicit width and height valid.

Do not give one axis competing owners.
Use a Qt Quick Layout for repeated row, column, or grid structure.