Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.10.0
-
None
Description
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.
Attachments
Issue Links
- duplicates
-
QTBUG-60134 Support std::vector and QVector as QML models
- Open
- relates to
-
QTBUG-82882 Assigning QVector<QString> to Repeater's model property results in count being 0
- Closed