summaryrefslogtreecommitdiffstats
path: root/examples/declarative/searchbox
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/searchbox')
-rw-r--r--examples/declarative/searchbox/SearchBox.qml17
-rw-r--r--examples/declarative/searchbox/main.qml6
2 files changed, 14 insertions, 9 deletions
diff --git a/examples/declarative/searchbox/SearchBox.qml b/examples/declarative/searchbox/SearchBox.qml
index be85023..adeddd1 100644
--- a/examples/declarative/searchbox/SearchBox.qml
+++ b/examples/declarative/searchbox/SearchBox.qml
@@ -18,7 +18,8 @@ FocusScope {
}
Text {
- id: typeSomething; anchors.fill: parent; anchors.leftMargin: 8
+ id: typeSomething
+ anchors.fill: parent; anchors.leftMargin: 8
verticalAlignment: Text.AlignVCenter
text: "Type something..."; color: "gray"; font.italic: true
}
@@ -27,18 +28,20 @@ FocusScope {
TextInput {
id: textInput
- anchors.left: parent.left; anchors.leftMargin: 8
- anchors.verticalCenter: parent.verticalCenter
+ anchors { left: parent.left; leftMargin: 8; verticalCenter: parent.verticalCenter }
focus: if (1) true
}
Image {
id: clear
- anchors.right: parent.right; anchors.rightMargin: 8
- anchors.verticalCenter: parent.verticalCenter
- source: "images/edit-clear-locationbar-rtl.png"; opacity: 0
+ anchors { right: parent.right; rightMargin: 8; verticalCenter: parent.verticalCenter }
+ source: "images/edit-clear-locationbar-rtl.png"
+ opacity: 0
- MouseArea { anchors.fill: parent; onClicked: { textInput.text = ''; focusScope.focus = true } }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { textInput.text = ''; focusScope.focus = true }
+ }
}
states: State {
diff --git a/examples/declarative/searchbox/main.qml b/examples/declarative/searchbox/main.qml
index eb95a23..9f73473 100644
--- a/examples/declarative/searchbox/main.qml
+++ b/examples/declarative/searchbox/main.qml
@@ -1,10 +1,12 @@
import Qt 4.7
Rectangle {
- width: 500; height: 250; color: "#edecec"
+ width: 500; height: 250
+ color: "#edecec"
Column {
- anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; spacing: 10
+ anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter }
+ spacing: 10
SearchBox { id: search1; KeyNavigation.tab: search2; KeyNavigation.backtab: search3; focus: true }
SearchBox { id: search2; KeyNavigation.tab: search3; KeyNavigation.backtab: search1 }