Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
4.8.5, 5.2.0, 5.4.0 Beta
-
Windows 7
Description
- Run qml code below.
- Click mouse on application, rect is enabled (changes to green) and gets activefocus.
- Wait and see that rect is disabled (after 3 sec changes to black) and see from console log that activeFocusChanged signal is emitted. That's correct behavior.
- Then click application again, rect is enabled
- Click OTHER application and wait 3sec. See the log that timer triggers. Issue is that activeFocusChanged signal is missing and rect stays green.
main.qml
import QtQuick 1.1 FocusScope { width: 360 height: 360 id: root Rectangle { id: rect anchors.centerIn: parent height: 60 width: 60 color: activeFocus? "green" : "black" onActiveFocusChanged: console.log("rect.onActiveFocusChanged: " + rect.activeFocus) onEnabledChanged: console.log("rect.onEnabledChanged: " + rect.enabled) onFocusChanged: console.log("rect.onFocusChanged: " + rect.focus) onVisibleChanged: console.log("rect.onVisibleChanged: " + rect.visible) } Timer { id: timer interval: 3000 repeat: false onTriggered: { console.log("..timer triggered") console.log("root.activeFocus: " + root.activeFocus) console.log("rect.activeFocus: " + rect.activeFocus) rect.enabled = false } } onActiveFocusChanged: { console.log("root.onActiveFocusChanged: " + root.activeFocus) } MouseArea { anchors.fill: parent onClicked: { console.log("root.activeFocus: " + root.activeFocus) console.log("rect.activeFocus: " + rect.activeFocus) rect.enabled = true rect.forceActiveFocus() timer.start() console.log("Timer started..") } } }