summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/listview/dynamic.qml2
-rw-r--r--examples/declarative/listview/itemlist.qml4
-rw-r--r--examples/declarative/listview/listview-example.qml4
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml16
-rw-r--r--examples/declarative/scrollbar/display.qml4
5 files changed, 15 insertions, 15 deletions
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
index 952f6a7..9b05ad5 100644
--- a/examples/declarative/listview/dynamic.qml
+++ b/examples/declarative/listview/dynamic.qml
@@ -145,7 +145,7 @@ Rectangle {
width: 8; height: view.height; anchors.right: view.right
opacity: 0
- orientation: "Vertical"
+ orientation: Qt.Vertical
position: view.visibleArea.yPosition
pageSize: view.visibleArea.heightRatio
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
index e387f28..b73b3a3 100644
--- a/examples/declarative/listview/itemlist.qml
+++ b/examples/declarative/listview/itemlist.qml
@@ -33,7 +33,7 @@ Rectangle {
anchors { fill: parent; bottomMargin: 30 }
model: itemModel
preferredHighlightBegin: 0; preferredHighlightEnd: 0
- highlightRangeMode: "StrictlyEnforceRange"
+ highlightRangeMode: ListView.StrictlyEnforceRange
orientation: ListView.Horizontal
snapMode: ListView.SnapOneItem; flickDeceleration: 2000
}
@@ -55,7 +55,7 @@ Rectangle {
radius: 3
color: view.currentIndex == index ? "blue" : "white"
- MouseArea {
+ MouseArea {
width: 20; height: 20
anchors.centerIn: parent
onClicked: view.currentIndex = index
diff --git a/examples/declarative/listview/listview-example.qml b/examples/declarative/listview/listview-example.qml
index 6feedf6..2e8cdda 100644
--- a/examples/declarative/listview/listview-example.qml
+++ b/examples/declarative/listview/listview-example.qml
@@ -75,7 +75,7 @@ Rectangle {
highlight: petHighlight
currentIndex: list1.currentIndex
preferredHighlightBegin: 80; preferredHighlightEnd: 220
- highlightRangeMode: "ApplyRange"
+ highlightRangeMode: ListView.ApplyRange
}
ListView {
@@ -87,7 +87,7 @@ Rectangle {
highlight: Rectangle { color: "lightsteelblue" }
currentIndex: list1.currentIndex
preferredHighlightBegin: 125; preferredHighlightEnd: 125
- highlightRangeMode: "StrictlyEnforceRange"
+ highlightRangeMode: ListView.StrictlyEnforceRange
flickDeceleration: 1000
}
}
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
index 5433156..c628a20 100644
--- a/examples/declarative/scrollbar/ScrollBar.qml
+++ b/examples/declarative/scrollbar/ScrollBar.qml
@@ -7,26 +7,26 @@ Item {
// position and pageSize are in the range 0.0 - 1.0. They are relative to the
// height of the page, i.e. a pageSize of 0.5 means that you can see 50%
// of the height of the view.
- // orientation can be either 'Vertical' or 'Horizontal'
+ // orientation can be either Qt.Vertical or Qt.Horizontal
property real position
property real pageSize
- property variant orientation : "Vertical"
+ property variant orientation : Qt.Vertical
// A light, semi-transparent background
Rectangle {
id: background
anchors.fill: parent
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
color: "white"
opacity: 0.3
}
// Size the bar to the required size, depending upon the orientation.
Rectangle {
- x: orientation == 'Vertical' ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
- y: orientation == 'Vertical' ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
- width: orientation == 'Vertical' ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
- height: orientation == 'Vertical' ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
+ y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
+ width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
+ height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
color: "black"
opacity: 0.7
}
diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml
index cb1da16..b8a5e36 100644
--- a/examples/declarative/scrollbar/display.qml
+++ b/examples/declarative/scrollbar/display.qml
@@ -37,7 +37,7 @@ Rectangle {
width: 12; height: view.height-12
anchors.right: view.right
opacity: 0
- orientation: "Vertical"
+ orientation: Qt.Vertical
position: view.visibleArea.yPosition
pageSize: view.visibleArea.heightRatio
}
@@ -47,7 +47,7 @@ Rectangle {
width: view.width-12; height: 12
anchors.bottom: view.bottom
opacity: 0
- orientation: "Horizontal"
+ orientation: Qt.Horizontal
position: view.visibleArea.xPosition
pageSize: view.visibleArea.widthRatio
}