~ubuntu-branches/ubuntu/saucy/qtdeclarative-opensource-src/saucy

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquickgridview/data/mirroring.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This example demonstrates how item positioning
 
2
// changes in right-to-left layout direction
 
3
 
 
4
import QtQuick 2.0
 
5
 
 
6
Rectangle {
 
7
    color: "lightgray"
 
8
    width: 340
 
9
    height: 370
 
10
 
 
11
    VisualItemModel {
 
12
        id: itemModel
 
13
        objectName: "itemModel"
 
14
        Rectangle {
 
15
            objectName: "item1"
 
16
            height: 110; width: 120; color: "#FFFEF0"
 
17
            Text { objectName: "text1"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
 
18
        }
 
19
        Rectangle {
 
20
            objectName: "item2"
 
21
            height: 130; width: 150; color: "#F0FFF7"
 
22
            Text { objectName: "text2"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
 
23
        }
 
24
        Rectangle {
 
25
            objectName: "item3"
 
26
            height: 170; width: 190; color: "#F4F0FF"
 
27
            Text { objectName: "text3"; text: "index: " + parent.VisualItemModel.index; font.bold: true; anchors.centerIn: parent }
 
28
        }
 
29
    }
 
30
 
 
31
    GridView {
 
32
        id: view
 
33
        objectName: "view"
 
34
        cellWidth: 190
 
35
        cellHeight: 170
 
36
        anchors.fill: parent
 
37
        anchors.bottomMargin: 30
 
38
        model: itemModel
 
39
        highlightRangeMode: "StrictlyEnforceRange"
 
40
        flow: GridView.TopToBottom
 
41
        flickDeceleration: 2000
 
42
    }
 
43
}