summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-30 03:14:04 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-30 03:14:04 +0200
commit4c0abb14712abe6d64338e74164e09ddd2f246f2 (patch)
tree364e2959c7602f89cda1653f29126b1bbfbab766 /examples
parent587b0fed9bd17a378eb0212c95074df965549ef2 (diff)
parent3acc686f9b2de7a261fc28e256b9f87ee5e341bc (diff)
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (54 commits) update qml.qch to version 4.7 Undefined is undefined, and now qml warns about it Fix so window will resize with the root object (broken by Avoid duplicate code for testing initial sizes Remove an unnecessary connect() in TextInput Ensure micro focus is updated in TextEdit and TextInput Fix flow layout not taking into account whether it's width and height are implicit or not. Avoid binding loop. Ensure Loader item change listener is removed when Loader is destroyed Adapt all qmlviewer testcases to the code changes in the actual viewer. Stop QMLLauncher from crashing on exit on Mac when quitting app via the VisualDataModel hasModelChildren role shadowed user roles. Allow positioning of ListView items width sub-pixel precision. Examples clean up Docs Improve appearance when scaling Tweak Qt Demo Behaviour forget to rename the moc include when renaming deviceorientation_maemo.cpp fix namespace macros fix QML Viewer resize modes ...
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/animation/behaviors/behavior-example.qml2
-rw-r--r--examples/declarative/cppextensions/cppextensions.qmlproject2
-rw-r--r--examples/declarative/keyinteraction/focus/Core/GridMenu.qml7
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml17
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViews.qml4
-rw-r--r--examples/declarative/keyinteraction/focus/focus.qml5
-rw-r--r--examples/declarative/ui-components/progressbar/content/ProgressBar.qml2
-rw-r--r--examples/declarative/ui-components/searchbox/SearchBox.qml2
-rw-r--r--examples/declarative/ui-components/tabwidget/main.qml6
9 files changed, 27 insertions, 20 deletions
diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/declarative/animation/behaviors/behavior-example.qml
index d187fbf1cb..adefb9e5d8 100644
--- a/examples/declarative/animation/behaviors/behavior-example.qml
+++ b/examples/declarative/animation/behaviors/behavior-example.qml
@@ -82,7 +82,7 @@ Rectangle {
property string text
- x: 62.5; y: 75; width: 75; height: 50
+ x: 62; y: 75; width: 75; height: 50
radius: 6
border.width: 4; border.color: "white"
color: "firebrick"
diff --git a/examples/declarative/cppextensions/cppextensions.qmlproject b/examples/declarative/cppextensions/cppextensions.qmlproject
index d4909f8685..6b362842cb 100644
--- a/examples/declarative/cppextensions/cppextensions.qmlproject
+++ b/examples/declarative/cppextensions/cppextensions.qmlproject
@@ -12,5 +12,5 @@ Project {
directory: "."
}
/* List of plugin directories passed to QML runtime */
- // importPaths: [ " ../exampleplugin " ]
+ importPaths: [ "plugins" ]
}
diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
index d0b45f5b7d..9a8d3f3726 100644
--- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
@@ -55,10 +55,11 @@ FocusScope {
GridView {
id: gridView
- x: 20; width: parent.width - 40; height: parent.height
+ anchors.fill: parent; anchors.leftMargin: 20; anchors.rightMargin: 20
cellWidth: 152; cellHeight: 152
focus: true
model: 12
+
KeyNavigation.down: listViews
KeyNavigation.left: contextMenu
@@ -70,9 +71,9 @@ FocusScope {
id: content
color: "transparent"
smooth: true
- anchors.centerIn: parent; width: container.width - 40; height: container.height - 40; radius: 10
+ anchors.fill: parent; anchors.margins: 20; radius: 10
- Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 }
+ Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; smooth: true }
Image { source: "images/qt-logo.png"; anchors.centerIn: parent; smooth: true }
}
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
index fba9b057a3..cc13637d83 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
@@ -42,7 +42,7 @@ import Qt 4.7
Item {
id: container
- x: 5; width: ListView.view.width - 10; height: 60
+ width: ListView.view.width; height: 60; anchors.leftMargin: 10; anchors.rightMargin: 10
Rectangle {
id: content
@@ -51,11 +51,15 @@ Item {
smooth: true
radius: 10
- Rectangle { color: "#91AA9D"; x: 3; y: 3; width: parent.width - 6; height: parent.height - 6; radius: 8 }
- Text {
- text: "List element " + (index + 1); color: "#193441"; font.bold: false; anchors.centerIn: parent
- font.pixelSize: 14
- }
+ Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; smooth: true; radius: 8 }
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: content
+ text: "List element " + (index + 1)
+ color: "#193441"
+ font.pixelSize: 14
}
MouseArea {
@@ -72,6 +76,7 @@ Item {
states: State {
name: "active"; when: container.focus == true
PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
+ PropertyChanges { target: label; font.pixelSize: 16 }
}
transitions: Transition {
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViews.qml b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
index 670a3fa45b..6f9ceb49d4 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViews.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
@@ -60,7 +60,7 @@ FocusScope {
ListView {
id: list2
- y: wantsFocus ? 10 : 40; x: parent.width / 3; width: parent.width / 3; height: parent.height - 20
+ y: wantsFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
@@ -72,7 +72,7 @@ FocusScope {
ListView {
id: list3
- y: wantsFocus ? 10 : 40; x: 2 * parent.width / 3; width: parent.width / 3; height: parent.height - 20
+ y: wantsFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list2
model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml
index 068ba1d001..8b2af7068b 100644
--- a/examples/declarative/keyinteraction/focus/focus.qml
+++ b/examples/declarative/keyinteraction/focus/focus.qml
@@ -68,7 +68,8 @@ Rectangle {
Rectangle {
id: shade
- color: "black"; opacity: 0; anchors.fill: parent
+ anchors.fill: parent
+ color: "black"; opacity: 0
}
states: State {
@@ -88,7 +89,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
MouseArea {
- anchors { fill: parent; leftMargin: -10; topMargin: -10; rightMargin: -10; bottomMargin: -10 }
+ anchors.fill: parent; anchors.margins: -10
onClicked: window.state = "contextMenuOpen"
}
}
diff --git a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml
index 829ab9bb85..6aa67655f5 100644
--- a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml
+++ b/examples/declarative/ui-components/progressbar/content/ProgressBar.qml
@@ -66,7 +66,7 @@ Item {
width: highlight.widthDest
Behavior on width { SmoothedAnimation { velocity: 1200 } }
- anchors { left: parent.left; top: parent.top; bottom: parent.bottom; leftMargin: 3; topMargin: 3; bottomMargin: 3 }
+ anchors { left: parent.left; top: parent.top; bottom: parent.bottom; margins: 3 }
radius: 1
gradient: Gradient {
GradientStop { id: gradient1; position: 0.0 }
diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml
index e6b9c8fe05..6d87837f6a 100644
--- a/examples/declarative/ui-components/searchbox/SearchBox.qml
+++ b/examples/declarative/ui-components/searchbox/SearchBox.qml
@@ -73,7 +73,7 @@ FocusScope {
TextInput {
id: textInput
- anchors { left: parent.left; leftMargin: 8; verticalCenter: parent.verticalCenter }
+ anchors { left: parent.left; leftMargin: 8; right: clear.left; rightMargin: 8; verticalCenter: parent.verticalCenter }
focus: true
}
diff --git a/examples/declarative/ui-components/tabwidget/main.qml b/examples/declarative/ui-components/tabwidget/main.qml
index e11902a516..4a27806ed1 100644
--- a/examples/declarative/ui-components/tabwidget/main.qml
+++ b/examples/declarative/ui-components/tabwidget/main.qml
@@ -50,7 +50,7 @@ TabWidget {
color: "#e3e3e3"
Rectangle {
- anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ anchors.fill: parent; anchors.margins: 20
color: "#ff7f7f"
Text {
width: parent.width - 20
@@ -68,7 +68,7 @@ TabWidget {
color: "#e3e3e3"
Rectangle {
- anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ anchors.fill: parent; anchors.margins: 20
color: "#7fff7f"
Text {
width: parent.width - 20
@@ -85,7 +85,7 @@ TabWidget {
anchors.fill: parent; color: "#e3e3e3"
Rectangle {
- anchors { fill: parent; topMargin: 20; leftMargin: 20; rightMargin: 20; bottomMargin: 20 }
+ anchors.fill: parent; anchors.margins: 20
color: "#7f7fff"
Text {
width: parent.width - 20