O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

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

Anchors

Anchors allow you to manage item geometry by attaching certain points of some objects to points of another object. These points are called anchor lines. The following diagram shows the anchor lines that are available for each Qt Quick item:

You can establish bindings between anchor lines to manage relative positioning of items. For each anchor line, there is a property that returns the current coordinate of that anchor line. For example, the left property returns the x coordinate of the left border of the item, and the top property returns the y coordinate of its top border. Next, each object contains the anchors property group that ...

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