import QtQuick 2.1
import QtQuick.Controls 1.0
Rectangle {
id: root
width: 1200
height: 600
Row{
Rectangle{
height:root.height
width: root.width / 3
color: "black"
z: 1
}
Flickable{
height:root.height
width: root.width / 3
contentHeight: image.height
contentWidth: image.width
Image{
id: image
source: "file:///Users/yyyy/Downloads/1359170070532.jpg"
fillMode: Image.PreserveAspectFit
smooth: true
}
}
ScrollView{
height:root.height
width: root.width / 3
Image{
source: "file:///Users/yyyy/Downloads/1359170070532.jpg"
fillMode: Image.PreserveAspectFit
smooth: true
}
}
}
}
import QtQuick 2.1
import QtQuick.Controls 1.0
Rectangle {
id: root
width: 1200
height: 600
Row{
Rectangle{
height:root.height
width: root.width / 3
color: "black"
z: 1
}
Flickable{
height:root.height
width: root.width / 3
contentHeight: image.height
contentWidth: image.width
Image{
id: image
source: "file:///Users/yyyy/Downloads/1359170070532.jpg"
fillMode: Image.PreserveAspectFit
smooth: true
}
}
ScrollView{
height:root.height
width: root.width / 3
Image{
source: "file:///Users/yyyy/Downloads/1359170070532.jpg"
fillMode: Image.PreserveAspectFit
smooth: true
}
}
}
}
To copy to clipboard, switch view to plain text mode
What I want to do is, change the fillMode of the image dynamically, when the image is too large
I want them become filckable or scrollable, but neither Flickable nor ScrollView respect Image.PreserveAspectFit, how could I make them respect the fillMode of the Image?
Bookmarks