Hi, With QQmlListProperty I can expose a QList to QML. I’m doing it a lot. But, is it possible to do the opposite?
QQmlListProperty documentation is a little bit vague in this sense. I want to receive in another QML the same list and then get the QList inside this element C++ class. This is because the glue between this classes is made thru the UI which is all made in QML. I’m declaring: Q_PROPERTY(QQmlListProperty<LKClipNote> notes READ notes WRITE setNotes NOTIFY notesChanged) QQmlListProperty<LKClipNote> notes(); void setNotes(const QQmlListProperty<LKClipNote> notes); But I don’t really need a property read And i’m writing: QQmlListProperty<LKClipNote> LKClipComposer::notes() { qDebug() << "read"; } void LKClipComposer::setNotes(const QQmlListProperty<LKClipNote> notes) { qDebug() << "write"; } However i’m having a crash. I also don’t know how to fetch the original list from the parameter. I know that QQmlListProperty has a data pointer but I don’t know how to get it from there. Any tips? Thanks, Regards, Nuno _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest