> > On 21 Nov 2014, at 01:13, Ian Monroe <[email protected]> wrote: > > There's nothing really magical about QAbstractItemModel in QML. They don't > turn into ListModel's, they are still plain QAbstractItemModel that have > the methods in C++. Their only superpower is that QML ListView can use it > as a model. > > Just add whatever methods make sense to QAbstractItemModel to insert and > edit the data and call them from QML. > > I agree with Ian, you can just make functions on your model Q_INVOKABLE, or you can get your model to listen to signals from your QML items (delegates). The more you can handle on the C++ side, the easier it'll be for you. That stuff is discussed a bit in this DevDays talk, but it's mostly about TreeViews specifically and probably more than you need: https://www.qtdeveloperdays.com/sites/default/files/north-america/QtQuickTreeView.pdf
Hope that helps, Alex
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
