Displaying QML components in GridView
-
Hi,
In C++ I have several MyComponent.qml instantiated (they are of custom C++ type which inherits from QQuickItem), and they are stored in QList. How to display this QList of QML components in a GridView (the GridView is defined in another QML component)? -
Hi,
In C++ I have several MyComponent.qml instantiated (they are of custom C++ type which inherits from QQuickItem), and they are stored in QList. How to display this QList of QML components in a GridView (the GridView is defined in another QML component)?@MartinD , Hi
First of all, I hope this article will be useful for you:
http://doc.qt.io/qt-5/qtquick-modelviewsdata-cppmodels.html#qobjectlist-based-modelSecondly, I think your case can be solved with ObjectModel and Repeater.
But, let me be honest, it will look like a workaround.