summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-07-21 02:23:15 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-07-21 02:33:18 (GMT)
commit21806ff0921641b4e4d9d39721ab4ebeae74dddc (patch)
tree6f854d6279385c120986f0288eb997373058106a /doc
parent4f6e480acce94d8ae920c3eda4879fc4f9cb2598 (diff)
downloadQt-21806ff0921641b4e4d9d39721ab4ebeae74dddc.zip
Qt-21806ff0921641b4e4d9d39721ab4ebeae74dddc.tar.gz
Qt-21806ff0921641b4e4d9d39721ab4ebeae74dddc.tar.bz2
QML focus API updates.
The wantsFocus property has been renamed to activeFocus, to better reflect its value. Reading and writing the focus property is also now consistent -- this property represents focus within a scope. Other small changes were made to keep things consistent with the new naming. Reviewed-by: Aaron Kennedy
Diffstat (limited to 'doc')
-rw-r--r--doc/src/declarative/focus.qdoc8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 0dd5eb3..e3ca963 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -73,12 +73,12 @@ See also the \l {Keys}{Keys attached property} and \l {KeyNavigation}{KeyNavigat
\section1 Querying the Active Focus Item
Whether or not an \l Item has \e {active focus} can be queried through the
-property \c {Item::focus}. For example, here we have a \l Text
+property \c {Item::activeFocus}. For example, here we have a \l Text
element whose text is determined by whether or not it has \e {active focus}.
\code
Text {
- text: focus ? "I have active focus!" : "I do not have active focus"
+ text: activeFocus ? "I have active focus!" : "I do not have active focus"
}
\endcode
@@ -174,7 +174,7 @@ Rectangle {
The right hand side of the example shows the expanded code - the equivalent QML
without the use of the component \c {MyWidget}. From this, the problem is
evident - there are no less than three elements that have the \c {Item::focus}
-property set to true. Ultimately only one element can have focus, and the
+property set to true. Ultimately only one element can have keyboard focus, and the
system has to decide which on. In this case the first appearance of the
\c {Item::focus} property being set to true on line 4 is selected, and the value
of \c {Item::focus} in the other two instances is reverted back to false. This
@@ -233,7 +233,7 @@ and the others are unset, just like when there are no \e {focus scopes}.
\o When a \e {focus scope} receives \e {active focus}, the contained element with
\c {Item::focus} set (if any) also gets \e {active focus}. If this element is
also a \l FocusScope, the proxying behaviour continues. Both the
-\e {focus scope} and the sub-focused item will have \c {Item::focus} set.
+\e {focus scope} and the sub-focused item will have \c {Item::activeFocus} set.
\endlist
So far the example has the second component statically selected. It is trivial