I need to get JSON data and load it to a table. As I guess I need some C++ skills for it. But can I do this in plain JavaScript or may be QML?
相关问题
- QML: Cannot read property 'xxx' of undefin
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
- how do I correctly return values from pyqt to Java
If you add the pure-QML JSONListModel to your project, you can use the full power of the View-Model pattern. However, it doesn't support presenting the data before it is fully downloaded.
You can do that easily in C++ as Qt5 has native support for JSON. Check the following answer for the example:
How to create/read/write JSon files in Qt5
Yes, you can do it purely using javascript API's in QML. Following code works on Qt 5.3.1