1. Flickable
滑动界面,用于触屏设备
import QtQuick 2.0
Flickable {
width: 200; height: 200
contentWidth: image.width //这里设置内容大小
contentHeight: image.height
ScrollBar.vertical: ScrollBar{}
Image { id: image; source: "bigImage.png" }
}
2. ScrollView
用于鼠标滚动,无法滑动,适合非触摸设备
ScrollView {
width: 200
height: 200
clip: true
Label {
text: "ABC"
font.pixelSize: 224
}
}