Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0
-
None
-
82f2ee802 (dev), 35de689c6 (6.5)
Description
Changing the 'target' of a binding by pressing the button in
import QtQuick import QtQuick.Controls.Material Window { id: win width: 640 height: 480 visible: true title: "Wohooooo" Component { id: sourceComponent1 Item { property string moo } } Component { id: sourceComponent2 Item {} } Loader { id: loader sourceComponent: sourceComponent1 } Button { text: "Click me" onClicked: () => { loader.sourceComponent = sourceComponent2 } } Binding { target: loader.item when: loader.item && loader.item.hasOwnProperty("moo") property: "moo" value: "42 is the answer" } }
runs into
qrc:/untitled/main.qml:41:5: QML Binding: Property 'moo' does not exist on QQuickItem*.
while I'd expect the binding to be deactivated due to the missing moo property
Attachments
For Gerrit Dashboard: QTBUG-112860 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
472278,3 | Binding: Reevaluate when before the target changes | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
473268,2 | Binding: Reevaluate when before the target changes | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |