Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
5.1.0
-
None
-
7c0156309eef50b5cfd3e498eaed6d7218dc40f8
Description
Intentiator does not handle properly items added to the model. In the following test case, the object added signal is not fired when data are added to the model.
import QtQuick 2.1 import QtQuick.Controls 1.0 Rectangle { width: 360 height: 360 property var index: 0 ListModel { id: citiesModel3 ListElement { text: "0 - Oslo" } } Column { Rectangle { id: rect width: 50 height: 100 Instantiator { id: popupItems model: citiesModel3 Text { parent: rect text: model["text"] || "" } onObjectAdded: print("onObjectAdded") } } Button { text: "append date" onClicked: { index++ citiesModel3.append({ text: index + " - Oslo"}) } } Label { text: "added element: " + index } Label { text: "model count: " + citiesModel3.count } } }
Tested on Ubuntu 11.10