blob: b99f50b854e245c4264fc152ca357dc3caac234b [file] [log] [blame]
// This example demonstrates how item positioning
// changes in right-to-left layout direction
import QtQuick 2.0
import QtQml.Models 2.12
Rectangle {
color: "lightgray"
width: 340
height: 370
ObjectModel {
id: itemModel
objectName: "itemModel"
Rectangle {
objectName: "item1"
height: 110; width: 120; color: "#FFFEF0"
Text { objectName: "text1"; text: "index: " + parent.ObjectModel.index; font.bold: true; anchors.centerIn: parent }
}
Rectangle {
objectName: "item2"
height: 130; width: 150; color: "#F0FFF7"
Text { objectName: "text2"; text: "index: " + parent.ObjectModel.index; font.bold: true; anchors.centerIn: parent }
}
Rectangle {
objectName: "item3"
height: 170; width: 190; color: "#F4F0FF"
Text { objectName: "text3"; text: "index: " + parent.ObjectModel.index; font.bold: true; anchors.centerIn: parent }
}
}
GridView {
id: view
objectName: "view"
cellWidth: 190
cellHeight: 170
anchors.fill: parent
anchors.bottomMargin: 30
model: itemModel
highlightRangeMode: "StrictlyEnforceRange"
flow: GridView.TopToBottom
flickDeceleration: 2000
}
}