Để thực hiện một Android ViewPager giống như đối với Qt, tôi sử dụng một listview như thế này:QML listview: Flickable như đại biểu không thể cuộn
ListView {
id: myListViewArticle
anchors.fill: parent
focus: true
highlightRangeMode: ListView.StrictlyEnforceRange
orientation: ListView.Horizontal
snapMode: ListView.SnapOneItem
model: modelArticles
delegate: articleDelegate
}
Và một Flickable như đại biểu của nó:
Component {
id: articleDelegate
Item {
id: item
width: 480; height: 800
Flickable {
id: mainScrollView
contentHeight: 1500
contentWidth: parent.width
anchors.fill: parent
clip: true
Text {
id: idArticleContent
text: articleContent
width: parent.width
font.pixelSize: 20
font.bold: true; color: "black"
wrapMode: Text.Wrap
}
}
ScrollDecorator {
flickableItem: mainScrollView
}
}
}
Nhưng sau khi điền dữ liệu cho listview, tôi thấy Flickable không thể cuộn được (trong verticle).
Bất kỳ ai cũng có thể cho tôi biết cách làm cho mục có thể cuộn được cuộn bên trong chế độ xem danh sách. Cám ơn rất nhiều về sự giúp đỡ của bạn.