[Qt-qml] emit data on a QAbstracListModel does not update the QML ListView.

Stephen Kelly steveire at gmail.com
Wed Sep 15 13:20:21 CEST 2010


Bartosh Wroblevksy wrote:

> 
> Hi Steve,
> I forgot to ask about this:
>> > 2) I have trouble seeing how in this case, moving rows and changing
>> > data> > is not equivalent. In fact,unless my morning coffee was not
>> > caffeinated.> > If I write> > > > m_elements[1] ="x"; emit
>> > dataChanged(index(1,0), index(1,0));> > Should I not expect to see the
>> > QML listview change?> > Yes, you are right. Indeed that is another bug.
>> > What you are doing > WorksFromMe, but I don't have a plugin for the
>> > model like you do, but I > create the QDeclarativeMainView in an
>> > application and use > setContextProperty(myModel). Maybe if loaded
>> > through a plugin qml doesn't > handle that signal somehow?> > It's
>> > worth another bug report.
> Did we actually confirm that it is a bug and that the signal does not get
> handled when loaded through a plugin? Is there a bugnumber for this? Do
> you want me to log one? Thanks

Yes, please do. I was able to reproduce by changing your move code to just 
m_items[0] = "x" follwed by dataChanged and it didn't update the QML. I 
didn't look any deeper than that, and I didn't file a bug.

All the best,

Steve.



More information about the Qt-qml mailing list