Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67459

Assigning QVector<QString> to Repeater's model property doesn't work

XMLWordPrintable

      I have a QObject with a QVector<QString> property, and when I bind it to a Repeater's model property, no delegates appear although QML can handle the list just fine.

      The reason for this is that Repeater's model property is a QVariant and QML directly passes a QVariant of QVector<QString> to it, bypassing QML's conversion from QVector<QString> to a JS list. The real culprit is QQmlListAccessor::setList, which only handles some list types such as QStringList, but really it should handle all the types in the "Sequence Type to JavaScript Array" list on this page:
      http://doc.qt.io/qt-5/qtqml-cppintegration-data.html

       This is probably still a bug since QQmlListAccessor hasn't really changed for a while.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shausman Simon Hausmann
            yokljo Joshua Worth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes