summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/focus.qdoc
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-07-21 02:23:15 (GMT)
committerToby Tomkins <toby.tomkins@nokia.com>2010-07-26 07:08:07 (GMT)
commit056bbc32fd64f48851e6ad058c5e4c1372a96564 (patch)
treea76fc7d01d913e371c949d839d40d3f394960d55 /doc/src/declarative/focus.qdoc
parentacebca36dc84677bb0875297b1739e15025323bb (diff)
downloadQt-056bbc32fd64f48851e6ad058c5e4c1372a96564.zip
Qt-056bbc32fd64f48851e6ad058c5e4c1372a96564.tar.gz
Qt-056bbc32fd64f48851e6ad058c5e4c1372a96564.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 (cherry picked from commit 21806ff0921641b4e4d9d39721ab4ebeae74dddc)
Diffstat (limited to 'doc/src/declarative/focus.qdoc')
-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 cc546c0..661930f 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