O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The anchors positioning model

Anchoring is one of the positioning models available in QML. It is used to specify relative positioning between visual items, and, from a computational perspective, it represents a very efficient model. However, it is only applicable between items which have either a parent-child relationship, or a sibling-sibling relationship.

Common anchoring options include anchors.left, anchors.right, anchors.top, and anchors.bottom—these properties can be bound to the left, right, top, and bottom properties of parent and sibling objects. These objects can be referenced via their object ids or, in case of a parent, via the parent property, which is available in all Item-derived types. anchors.fill, which we used in the preceding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required