Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Rectangles & padding

$
0
0
It is the anchors which define how the child rectangle fills the parent rectangle. Remember, in QML, just because an object instance is declared within another one does NOT mean that it is visually located inside that other one. The positioning (either via anchors, or some other positioning method) define where it “appears” and thus the positioning also defines the spacing / padding. So, to implement what you want, just add an “anchors.margins: 10” to your anchors declaration. Note that the margin can also be specified separately for each edge; see http://doc-snapshot.qt-project.org/qt5-stable/qtquick/qtquick-positioning-anchors.html for more information. Cheers, Chris.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images