diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-01 00:33:27 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-01 00:33:27 (GMT) |
commit | 283e899c7d57c003facc5ed8aef8e5dacf2eb945 (patch) | |
tree | 10142cb729d010645e8326aceba0ac22f0bbf0bc /examples | |
parent | c9bb16f0b34f180bf955682ab31fc1ff63d5de84 (diff) | |
parent | bc1fb594d24b54b9c83994817348b0163ef1a9c5 (diff) | |
download | Qt-283e899c7d57c003facc5ed8aef8e5dacf2eb945.zip Qt-283e899c7d57c003facc5ed8aef8e5dacf2eb945.tar.gz Qt-283e899c7d57c003facc5ed8aef8e5dacf2eb945.tar.bz2 |
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:
Fix example code and image
Fix doc
Fix some bugs in the QML Web Browser buttons
Fix zoom bug in QML Web Browser demo
Fix Typo
Various doc fixes and improvements
Document issues with rectangle border width of 1 where clipping is used
Simplify selection setting. Make TextInput more like TextEdit.
Diffstat (limited to 'examples')
7 files changed, 14 insertions, 10 deletions
diff --git a/examples/declarative/modelviews/webview/content/FieldText.qml b/examples/declarative/modelviews/webview/content/FieldText.qml index c9adde5..17fa4cd 100644 --- a/examples/declarative/modelviews/webview/content/FieldText.qml +++ b/examples/declarative/modelviews/webview/content/FieldText.qml @@ -161,8 +161,6 @@ Item { color: "black" readOnly: false focus: true - selectionStart: 0 - selectionEnd: -1 } PropertyChanges { target: editRegion diff --git a/examples/declarative/sqllocalstorage/hello.qml b/examples/declarative/sqllocalstorage/hello.qml index 0913d42..421a74c 100644 --- a/examples/declarative/sqllocalstorage/hello.qml +++ b/examples/declarative/sqllocalstorage/hello.qml @@ -68,4 +68,4 @@ Text { Component.onCompleted: findGreetings() } - +//![0] diff --git a/examples/declarative/text/edit/edit.qml b/examples/declarative/text/edit/edit.qml index 2774739..0be42e9 100644 --- a/examples/declarative/text/edit/edit.qml +++ b/examples/declarative/text/edit/edit.qml @@ -157,14 +157,16 @@ Rectangle { if (editor.state == "selection" && drag != "") { if (drag == "start") { var pos = edit.positionAt(mouse.x+x+startHandle.width/2,mouse.y+y); - if (edit.selectionEnd < pos) - edit.selectionEnd = pos; - edit.selectionStart = pos; + var e = edit.selectionEnd; + if (e < pos) + e = pos; + edit.select(pos,e); } else if (drag == "end") { var pos = edit.positionAt(mouse.x+x-endHandle.width/2,mouse.y+y); - if (edit.selectionStart > pos) - edit.selectionStart = pos; - edit.selectionEnd = pos; + var s = edit.selectionStart; + if (s > pos) + s = pos; + edit.select(s,pos); } } } @@ -226,7 +228,7 @@ Rectangle { height: 16 Text { anchors.centerIn: parent; text: "Deselect" } MouseArea { anchors.fill: parent; - onClicked: { edit.cursorPosition = edit.selectionEnd; edit.selectionStart = edit.selectionEnd; editor.state = "" } } + onClicked: { edit.cursorPosition = edit.selectionEnd; edit.select(edit.cursorPosition,edit.cursorPosition); editor.state = "" } } } } } diff --git a/examples/declarative/tutorials/extending/chapter1-basics/app.qml b/examples/declarative/tutorials/extending/chapter1-basics/app.qml index 7de32f2..9af155c 100644 --- a/examples/declarative/tutorials/extending/chapter1-basics/app.qml +++ b/examples/declarative/tutorials/extending/chapter1-basics/app.qml @@ -55,3 +55,4 @@ Rectangle { text: aMusician.name + " plays the " + aMusician.instrument } } +//![0] diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/declarative/tutorials/extending/chapter2-methods/app.qml index 495413f..02d33c2 100644 --- a/examples/declarative/tutorials/extending/chapter2-methods/app.qml +++ b/examples/declarative/tutorials/extending/chapter2-methods/app.qml @@ -57,3 +57,4 @@ Rectangle { onClicked: aMusician.perform() } } +//![0] diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml index 46408cb..8bf6ecf 100644 --- a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml +++ b/examples/declarative/tutorials/extending/chapter3-bindings/app.qml @@ -69,3 +69,4 @@ Rectangle { } } } +//![0] diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml index 09662d6..d76f801 100644 --- a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml +++ b/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml @@ -51,3 +51,4 @@ Item { Component.onCompleted: console.log("Reddy plays the " + reddy.instrument.type) } +//![0] |