Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SectionScroller and QList<QObject*>
Qt 6.11 is out! See what's new in the release blog

SectionScroller and QList<QObject*>

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 772 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marmistrz
    wrote on last edited by
    #1

    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"@

    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:

    @.../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:

    @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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved