-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.4.0
-
None
-
Qt 5.4 on Kubuntu 15.04
It is not possible to have a JS function inside the model of eg. a Repeater and then trigger it. Neither from the delegate using modelData.trigger() nor by accessing it by index.
Repeater {
model: [
{
label: "Trigger",
trigger: function() {
console.log("Hello")
}
}
]
Button {
text: modelData.label
onClicked: modelData.trigger()
}
}
Clicking the button will just yield an error rather than invoking the function.
TypeError: Property 'trigger' of object [object Object] is not a function
- relates to
-
QTBUG-69771 Functions in QML model data not accessible
-
- Open
-