You can simply create a rectangle that isn't a parent/child of anything. Just make a rectangle and set its position behind the image.
example:
import Qt 4.7
Rectangle {
id: rectangle2
width: 200
height: 200
Rectangle {
id: rectangle1
x: 35
y: 58
width: 131
height: 84
color: "#f92626"
opacity: 0.49
anchors.verticalCenterOffset: 0
anchors.verticalCenter: parent.verticalCenter
}
Image {
id: image1
x: 74
y: 76
width: 54
height: 49
source: "qrc:/qtquickplugin/images/template_image.png"
}
}
import Qt 4.7
Rectangle {
id: rectangle2
width: 200
height: 200
Rectangle {
id: rectangle1
x: 35
y: 58
width: 131
height: 84
color: "#f92626"
opacity: 0.49
anchors.verticalCenterOffset: 0
anchors.verticalCenter: parent.verticalCenter
}
Image {
id: image1
x: 74
y: 76
width: 54
height: 49
source: "qrc:/qtquickplugin/images/template_image.png"
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks