Time for action – Editing anchors

Let's see how we can edit anchors in the form editor and see the result on the fly. Select the argument1 text field and switch to the Layout tab in the middle part of the Properties pane. The tab contains Anchors text, followed by a set of buttons for all anchor lines of this item. You can mouse over the buttons to see their tooltips. Click on the first button, Anchor item to the top. A new set of controls will appear below the button, allowing you to configure this anchor.

First, you can select the target object, that is, the object containing the anchor line that will be used as the reference. Next, you can select the margin between the reference anchor line and the anchor line of the current object. To ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.