aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanchors/data/centerin.qml
blob: 94c344b4e8fb97adf951de718959c90b1dbd2fb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import QtQuick 2.0

Rectangle {
    width: 200; height: 200
    Rectangle {
        objectName: "centered"
        width: 50; height: 50; color: "blue"
        anchors.centerIn: parent;
        anchors.verticalCenterOffset: 30
        anchors.horizontalCenterOffset: 10
    }

    Rectangle {
        objectName: "centered2"
        width: 11; height: 11; color: "green"
        anchors.centerIn: parent;
    }

    Rectangle {
        objectName: "centered3"
        width: 11; height: 11; color: "green"
        anchors.centerIn: parent;
        anchors.alignWhenCentered: false
    }

    Rectangle {
        objectName: "centered4"
        width: 0.9; height: 0.9; color: "plum"
        anchors.centerIn: parent;
        anchors.alignWhenCentered: false
    }
}