6 // The properties that define the scrollbar's state.
7 // position and pageSize are in the range 0.0 - 1.0. They are relative to the
8 // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
9 // of the height of the view.
10 // orientation can be either Qt.Vertical or Qt.Horizontal
11 property variant orientation : Qt.Vertical
12 property int windowHeight :100
13 property alias position: slider.x
17 // Size the bar to the required size, depending upon the orientation.
28 property variant lastPresX;
29 anchors.rightMargin: 5
37 onMousePositionChanged:{
40 num= slider.x+(mouseX-lastPresX);
42 if(num>(scrollBar.width-slider.width))
43 slider.x=scrollBar.width-slider.width
50 onPressed: lastPresX=mouseX;