Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.1, 6.7.0
-
-
23691ba87 (dev), d49aa4022 (6.7), 33f342d10 (tqtc/lts-6.5)
Description
When forceActiveFocus() method of a TextField is called from onActiveFocusChanged of an Item object, it causes the activeFocus of the calling Item object to be triggered multiple times.
A code example is provided below:
import QtQuick 2.15 import QtQuick.Controls 2.15 ApplicationWindow { visible:true height: 640 width: 480 Component.onCompleted: item.forceActiveFocus() Item { id: item anchors.fill: parent onActiveFocusChanged: { console.log("item focus:", activeFocus) textField.forceActiveFocus() } TextField { id: textField onActiveFocusChanged: { console.log("text field focus:", activeFocus) } } } }
Attachments
Issue Links
- resulted from
-
QTBUG-89736 focusable item becomes impossible to focus after reparenting to a newly loaded item
- Closed
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-120670 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
553810,10 | QQuickItem::setFocus: Don't return too early | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
554485,2 | QQuickItem::setFocus: Don't return too early | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
554515,4 | QQuickItem::setFocus: Don't return too early | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |