[Qt-qml] Model view example showing editing capability

Pelle Johnsen pelle.johnsen at gmail.com
Sat Jan 15 09:38:15 CET 2011


Hi,

I can recommend subclassing QAbstractListModel (
http://doc.trolltech.com/4.7/qabstractlistmodel.html). You can use a normal
QList, but it only has a single change signal, so if e.g. you insert an item
then QML thinks the whole list has changed, which can cause performance
problems. The whole Qt model/view classes are rather complex (compared to
QList), but in my experience it's worth the effort to use it.

 -pjoe

On Fri, Jan 14, 2011 at 6:26 PM, Jamil Naja <jamil.m.naja at gmail.com> wrote:

> Hi guys,
> As the title suggests, I am looking for an example with a C++ model and QML
> view where the QML view (or other QML elements within the QML code)
> doing modification on the c++ model data.
>
> Any suggestions ?
>
> Thanks
> Jamil
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110115/353450d4/attachment.html 


More information about the Qt-qml mailing list