[Solved]Flickable - Help
-
Can anyone show me what the right syntax for flickable(vertically)? I'm trying to make my background move when you drag the screen because it usually fits the image into the screen.
@
import Qt 4.7Rectangle {
id: mainwindowheight: 402 width: 452 Flickable { id: flick function addItem(bg){ var component = Qt.createComponent(bg) component.createObject(flick.contentItem); } boundsBehavior: Flickable.StopAtBounds Rectangle { id: scrollbar anchors.right: flickable.right y: flickable.visibleArea.yPosition * flickable.height width: 10 height: flickable.visibleArea.heightRatio * flickable.height color: "black" } Image { id: bg source: "image.jpg" } }
}
@Thank you! :D
-
If I understand your question correctly, you need to set
width, height, contentHeight,ContextWidgth properties of your flick element.
see "Flickable documentation":http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html for more details.
-
facepalm I failed miserably at that part. I got it now thanks! :)