Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.6
-
None
Description
import QtQuick 2.4 Item { id: root property int theNum onTheNumChanged: { console.log("theNum", theNum) } property var theOtherNum : 10 onTheOtherNumChanged: { console.log("theOtherNum", theOtherNum) } Timer { running: true repeat: true property bool invert onTriggered: { theNum = JSON.parse(JSON.stringify(theNum)) theOtherNum = JSON.parse(JSON.stringify(theOtherNum)) } } }
This results in
qml: theOtherNum 10 qml: theOtherNum 10 qml: theOtherNum 10 qml: theOtherNum 10
repeated. If this is intentional (because we are actually setting a different javascript object even if it's the same value, for example), it should perhaps be documented here: http://doc.qt.io/qt-5/qml-var.html#change-notification-semantics
Attachments
Issue Links
- duplicates
-
QTBUG-42255 Change signal emitted for undefined value
- Open