summaryrefslogtreecommitdiffstats
path: root/Qt
diff options
context:
space:
mode:
authorDamian Jansen <damian.jansen@nokia.com>2011-03-01 12:43:06 +1000
committerDamian Jansen <damian.jansen@nokia.com>2011-03-01 12:43:06 +1000
commit73c02fc3cae192e4a5109987e4d37c6cf78e19c5 (patch)
treef88bc99e58bbd5966544f51e69455da7a78aee5f /Qt
parent78576fe54db197fb4a985f0ac6c8873e3af23006 (diff)
Fix cursor button status using textedit's onFocusChanged property
Diffstat (limited to 'Qt')
-rw-r--r--Qt/examples/declarative/textinput/textinput.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/Qt/examples/declarative/textinput/textinput.qml b/Qt/examples/declarative/textinput/textinput.qml
index 011a210..999f1af 100644
--- a/Qt/examples/declarative/textinput/textinput.qml
+++ b/Qt/examples/declarative/textinput/textinput.qml
@@ -61,13 +61,13 @@ Rectangle {
smooth: smoothon.active
cursorVisible: cursoron.active
autoScroll: autoscrollon.active
+ onFocusChanged: { if(focus){ cursoron.active = true; } }
}
Column {
anchors.left: textinput1.right; anchors.leftMargin: 5; spacing: 2
Text {
id: textinputinfo
- anchors.left: textinput1.right; anchors.leftMargin: 5
text: "Pos: "+ textinput1.cursorPosition +" Sel: "+ textinput1.selectionStart +"-"+ textinput1.selectionEnd +" Max: "+ textinput1.maximumLength
}
@@ -217,7 +217,7 @@ Rectangle {
ToggleButton { id: strikeouton; effectname: "Strikeout" }
ToggleButton { id: underlineon; effectname: "Underline" }
ToggleButton { id: smoothon; effectname: "Smooth" }
- ToggleButton { id: cursoron; effectname: "Cursor" }
+ ToggleButton { id: cursoron; effectname: "Cursor"; active: true }
ToggleButton { id: autoscrollon; effectname: "Autoscroll" }
}
}