Hi, I was wondering if someone could help me with putting QML ListModel
as param into a plugin?

 It is fairly simple the other way around, there are many examples like
the QDirModel in documentation.
----
  QDeclarativeView view;

  QDirModel model;
  view.rootContext()->setContextProperty("dirModel", &model);
----

 Now the tricky part is, how is it done the other way around? if I am
interested in getting the ListModel into a plugin and append some
ListElements to it?

 I have tested a bit with QDeclarativeListReference, QDeclarativeProperty
and QAbstractListModel, but I didn't quite get it working. all I got was
complains like QMetaProperty::read: Unable to handle unregistered
datatype 'QDeclarativeListReference*' for property
'QDeclarativeBoundSignalParameters::target'.

It has been bugging me which would be "Q" equivalent of ListModel. at
least even Q_INVOKABLE void myfunction(QList & target); wasn't working
either.

Any help is much appreciated.


-- 
Lars Kinnunen

_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to