QJsonModel is a JSON tree model class for Qt6/C++17 based on QAbstractItemModel.
QJsonModel was originally written by Sacha Shutz (https://github.com/dridk).
This fork is also released under the MIT License.
- CMake (version 3.21 or higher)
- C++17-compatible compiler
-
Clone the repository:
git clone <URL>
-
Navigate to the project directory:
cd elemental-game
-
Configure your build system:
cmake -B debug -G Unix Makefiles # or cmake -B debug -G Ninja # this is faster and more modern
-
Invoke your build system
cmake --build debug
You can add this library to your CMake projects using FetchContent() or CPM_AddPackage().
Here's how to do it with CPM_AddPackage:
COMING SOON
QJsonModel * model = new QJsonModel;
QTreeView * view = new QTreeView;
view->setModel(model);
model->load("example.json")