desertbit / gml

MIT licensed Go QML Bindings
MIT License
19 stars 4 forks source link

ListView: Generate C++ classes from data structs #10

Open skaldesh opened 4 years ago

skaldesh commented 4 years ago

Check out this guide: https://doc.qt.io/qt-5/qtquick-modelviewsdata-cppmodels.html

Maybe we can stop sending QVariants over the go-qml bridge, and use proper C++ classes. This would greatly simplify the access to the list elements in QML (compare "display/model.display" with JSON.parse against simple "text" or "name" accesses).

This would need something like a gml.ListViewData class that is added to the data struct in go