|
|
|
|
|
by realharo
2544 days ago
|
|
Last time I looked at QML (a few years ago), you couldn't just use any data in your UI directly, you had to wrap it in clunky models. When using C++, looks like you have to use things like QAbstractListModel https://qmlbook.github.io/ch16-qtcpp/qtcpp.html#a-simple-mod... Even without C++, there are things like ListModel and ListElement https://qmlbook.github.io/ch07-modelview/modelview.html This is a far cry from React where you just use language-native data structures directly (you only need to do mutations in specific ways). As far as I can tell, you also can't just use native language constructs like functions/ifs/.map, etc. to compose the UI elements. Instead you have containers like Repeater. It seems very different to me compared to React, like built around a significantly different philosophy. |
|
Even defining what a "native" type is seems like it would be fraught. I guess the c++ way would be to accept begin and end iterators - but of what type?