summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/contacts/FieldText.qml40
-rw-r--r--demos/declarative/contacts/RemoveButton.qml23
-rw-r--r--demos/declarative/webbrowser/fieldtext/FieldText.qml2
3 files changed, 31 insertions, 34 deletions
diff --git a/demos/declarative/contacts/FieldText.qml b/demos/declarative/contacts/FieldText.qml
index d30d4d8..2e8b60d 100644
--- a/demos/declarative/contacts/FieldText.qml
+++ b/demos/declarative/contacts/FieldText.qml
@@ -9,29 +9,29 @@ Rectangle {
property var label: ""
onTextChanged: { reset() }
signal confirmed
- resources: [
- Script {
- function edit() {
- if (!contacts.mouseGrabbed) {
- fieldText.state='editing';
- contacts.mouseGrabbed=true;
- }
- }
- function confirm() {
- fieldText.text = textEdit.text;
- fieldText.state='';
- contacts.mouseGrabbed=false;
- fieldText.confirmed();
- }
- function reset() {
- textEdit.text = fieldText.text;
- fieldText.state='';
- contacts.mouseGrabbed=false;
+ Script {
+
+ function edit() {
+ if (!contacts.mouseGrabbed) {
+ fieldText.state='editing';
+ contacts.mouseGrabbed=true;
}
-
}
- ]
+ function confirm() {
+ fieldText.text = textEdit.text;
+ fieldText.state='';
+ contacts.mouseGrabbed=false;
+ fieldText.confirmed();
+ }
+ function reset() {
+ textEdit.text = fieldText.text;
+ fieldText.state='';
+ contacts.mouseGrabbed=false;
+ }
+
+ }
+
Image {
id: cancelIcon
width: 22
diff --git a/demos/declarative/contacts/RemoveButton.qml b/demos/declarative/contacts/RemoveButton.qml
index cc858c3..2c3cc9e 100644
--- a/demos/declarative/contacts/RemoveButton.qml
+++ b/demos/declarative/contacts/RemoveButton.qml
@@ -8,21 +8,20 @@ Rectangle {
radius: 5
property var expandedWidth: 230
signal confirmed
- resources: [
- Script {
- function toggle() {
- if (removeButton.state == 'opened') {
- removeButton.state = '';
- contacts.mouseGrabbed=false;
- } else {
- if (!contacts.mouseGrabbed) {
- removeButton.state = 'opened';
- contacts.mouseGrabbed=true;
- }
+ Script {
+ function toggle() {
+ if (removeButton.state == 'opened') {
+ removeButton.state = '';
+ contacts.mouseGrabbed=false;
+ } else {
+ if (!contacts.mouseGrabbed) {
+ removeButton.state = 'opened';
+ contacts.mouseGrabbed=true;
}
}
}
- ]
+ }
+
Image {
id: trashIcon
width: 22
diff --git a/demos/declarative/webbrowser/fieldtext/FieldText.qml b/demos/declarative/webbrowser/fieldtext/FieldText.qml
index fe55185..2adfbbf 100644
--- a/demos/declarative/webbrowser/fieldtext/FieldText.qml
+++ b/demos/declarative/webbrowser/fieldtext/FieldText.qml
@@ -10,7 +10,6 @@ Item {
signal cancelled
signal startEdit
- resources: [
Script {
function edit() {
@@ -36,7 +35,6 @@ Item {
}
}
- ]
Image {
id: cancelIcon