Qt Code:
  1. import QtQuick 2.1
  2. import QtQuick.Controls 1.0
  3.  
  4. Rectangle {
  5. id: root
  6. width: 1200
  7. height: 600
  8.  
  9. Row{
  10. Rectangle{
  11. height:root.height
  12. width: root.width / 3
  13. color: "black"
  14. z: 1
  15. }
  16.  
  17. Flickable{
  18. height:root.height
  19. width: root.width / 3
  20. contentHeight: image.height
  21. contentWidth: image.width
  22. Image{
  23. id: image
  24.  
  25. source: "file:///Users/yyyy/Downloads/1359170070532.jpg"
  26. fillMode: Image.PreserveAspectFit
  27. smooth: true
  28. }
  29. }
  30.  
  31. ScrollView{
  32. height:root.height
  33. width: root.width / 3
  34.  
  35. Image{
  36.  
  37. source: "file:///Users/yyyy/Downloads/1359170070532.jpg"
  38. fillMode: Image.PreserveAspectFit
  39. smooth: true
  40. }
  41. }
  42. }
  43. }
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?