tanthinh1510
15th May 2015, 04:29
I create simple example using flickable and I had problem:
I only want image show in Flickable Area. Outside Flickable Area, image is hide.
It's show in image below.
ApplicationWindow {
title: qsTr("Hello World")
width: 640
height: 480
visible: true
Rectangle{
id: main
anchors.fill: parent
color: "orange"
}
Flickable {
anchors.centerIn: main
width: 200; height: 200
contentWidth: image.width; contentHeight: image.height
Image {
id: image;
source: "qrc:///bigImage.jpg"
}
}
}
Image: https://www.dropbox.com/s/76h8n65bcem09sg/flickable.jpg?dl=0
I only want image show in Flickable Area. Outside Flickable Area, image is hide.
It's show in image below.
ApplicationWindow {
title: qsTr("Hello World")
width: 640
height: 480
visible: true
Rectangle{
id: main
anchors.fill: parent
color: "orange"
}
Flickable {
anchors.centerIn: main
width: 200; height: 200
contentWidth: image.width; contentHeight: image.height
Image {
id: image;
source: "qrc:///bigImage.jpg"
}
}
}
Image: https://www.dropbox.com/s/76h8n65bcem09sg/flickable.jpg?dl=0