View Single Post
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#1
Hi,

I'd like to use QML SectionScroller with a QList<QObject*> based model.
My ListView's section configuration is:

Code:
section.criteria: ViewSection.FirstCharacter
section.property: "form0"
Where form0 property is valid and displayed in the view delegate

When the SectionScroller is inserted to the QML code, I'm getting an error:

Code:
.../com/nokia/meego/SectionScroller.qml:319: Error: cannot assign [undefined] to QString
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:

Code:
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
};
Thanks
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2013-02-02 at 19:10.