In this code, when I click zoomIn rectangle, the picture does zoom in, but the default scrollbars of ScrollView do not change accordingly. They remain the same. Therefore I cannot scroll the zoomed picture.

http://doc.qt.io/qt-5/qml-qtquick-co...crollview.html

Please point out the fault.

Qt Code:
  1. Rectangle
  2. {
  3. id: zoomIn
  4. height: 50; width: 50; color: "blue"
  5. Text { text: qsTr("Zoom In") }
  6. MouseArea
  7. {
  8. anchors.fill: parent
  9. onClicked:
  10. {
  11. currentPicture.scale += 0.5
  12. }
  13. }
  14. }
  15.  
  16.  
  17. ScrollView
  18. {
  19. id: head
  20. anchors.top: buttons.bottom
  21. anchors.topMargin: 30
  22. height: 300; width: 300
  23. frameVisible: true
  24.  
  25. Image
  26. {
  27. id: currentPicture
  28. height: head.height; width: head.width
  29. source: folderModel1.hh
  30. z:0
  31. }
  32. }
To copy to clipboard, switch view to plain text mode