Hi,
I'd like to use QML SectionScroller with a QList<QObject*> based model.
My ListView's section configuration is:
section.criteria: ViewSection.FirstCharacter
section.property: "form0"
section.criteria: ViewSection.FirstCharacter
section.property: "form0"
To copy to clipboard, switch view to plain text mode
Where form0 property is valid and displayed in the view
When the SectionScroller is inserted to the QML code, I'm getting an error:
...
/com
/nokia
/meego
/SectionScroller.
qml:319: Error
: cannot assign
[undefined
] to
QString
.../com/nokia/meego/SectionScroller.qml:319: Error: cannot assign [undefined] to QString
To copy to clipboard, switch view to plain text mode
What am I doing wrong? I'd prefer to avoid QAbstractListModel, as I think it'd be an overkill right there - the elements are like this:
class IrregularVerb
: public QObject{
Q_OBJECT
Q_PROPERTY(QString form0 READ getForm0 NOTIFY formChanged
) Q_PROPERTY(QString form1 READ getForm1 NOTIFY formChanged
) Q_PROPERTY(QString form2 READ getForm2 NOTIFY formChanged
) // internal stuff there
};
class IrregularVerb : public QObject
{
Q_OBJECT
Q_PROPERTY(QString form0 READ getForm0 NOTIFY formChanged)
Q_PROPERTY(QString form1 READ getForm1 NOTIFY formChanged)
Q_PROPERTY(QString form2 READ getForm2 NOTIFY formChanged)
// internal stuff there
};
To copy to clipboard, switch view to plain text mode
Thanks
Bookmarks