<i>&quot;But writing constraints as text is painful.&quot;</i><p>I find writing the anchors in QML (Qt Quick&#x27;s layout language) to be quite pleasant and easy.<p>Eg:<p><pre><code>    Rectangle {
        Rectangle {
            id: a
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.left: parent.left
            width: parent.width &#x2F; 2
       }
       Rectangle {
            anchors.top: parent.top
            anchors.bottom: parent.bottom
            anchors.left: a.right
            anchors.right: parent.right
       }
</code></pre>
The two most &quot;interesting&quot; parts of this are the <i>width: parent.width &#x2F; 2</i> and <i>anchors.left: a.right</i><p>There is much much more, much of which makes it more concise, but that&#x27;s the basics.