PDA

View Full Version : Scrollbars of ScrollView do not change when the picture is zooomed in - QML



TheIndependentAquarius
9th October 2015, 07:31
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-controls-scrollview.html

Please point out the fault.


Rectangle
{
id: zoomIn
height: 50; width: 50; color: "blue"
Text { text: qsTr("Zoom In") }
MouseArea
{
anchors.fill: parent
onClicked:
{
currentPicture.scale += 0.5
}
}
}


ScrollView
{
id: head
anchors.top: buttons.bottom
anchors.topMargin: 30
height: 300; width: 300
frameVisible: true

Image
{
id: currentPicture
height: head.height; width: head.width
source: folderModel1.hh
z:0
}
}