import QtQuick 1.0 Item { width: 400 height: 400 Image { anchors.fill: parent source: "images/background.png" } Image { id: spaceship source: "images/spaceship.png" anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter } }
import QtQuick 1.0 Item { width: 400 height: 400 Image { anchors.fill: parent source: "images/background.png" } Spaceship { id: spaceship anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter } }
anchors.right
, anchors.rightMargin
…import QtQuick 1.0 Item { width: 400 height: 400 Image { anchors.fill: parent source: "images/background.png" } Image { id: spaceship source: "images/spaceship.png" anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter } Image { id: anotherSpaceship source: "images/spaceship.png" scale: 0.5 smooth: true anchors.top: spaceship.bottom anchors.right: spaceship.right anchors.rightMargin: 100 } }