aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickitem.cpp')
-rw-r--r--src/quick/items/qquickitem.cpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 3d0f550d14..5fd1882216 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -4237,7 +4237,6 @@ void QQuickItem::mapToItem(QQmlV4Function *args) const
/*!
\qmlmethod QtQuick::Item::forceActiveFocus()
- \overload
Forces active focus on the item.
@@ -4250,6 +4249,18 @@ void QQuickItem::mapToItem(QQmlV4Function *args) const
\sa activeFocus
*/
+/*!
+ Forces active focus on the item.
+
+ This method sets focus on the item and ensures that all ancestor
+ FocusScope objects in the object hierarchy are also given \l focus.
+
+ The reason for the focus change will be \l [CPP] Qt::OtherFocusReason. Use
+ the overloaded method to specify the focus reason to enable better
+ handling of the focus change.
+
+ \sa activeFocus
+*/
void QQuickItem::forceActiveFocus()
{
forceActiveFocus(Qt::OtherFocusReason);
@@ -4257,7 +4268,19 @@ void QQuickItem::forceActiveFocus()
/*!
\qmlmethod QtQuick::Item::forceActiveFocus(Qt::FocusReason reason)
+ \overload
+
+ Forces active focus on the item with the given \a reason.
+
+ This method sets focus on the item and ensures that all ancestor
+ FocusScope objects in the object hierarchy are also given \l focus.
+ \since 5.1
+
+ \sa activeFocus, Qt::FocusReason
+*/
+/*!
+ \overload
Forces active focus on the item with the given \a reason.
This method sets focus on the item and ensures that all ancestor