Qt Json Tree Model
Go to file
2024-05-02 20:00:56 -04:00
CMake Convert to CMake project; add object,static,shared targets. 2024-05-02 19:16:43 -04:00
include Remove spurrious header in QJsonModel.hpp 2024-05-02 19:51:41 -04:00
.gitignore Convert to CMake project; add object,static,shared targets. 2024-05-02 19:16:43 -04:00
CMakeLists.txt CMakeLists.txt: prepend local CMake modules to search path, rather than append 2024-05-02 20:00:56 -04:00
LICENSE change license to MIT 2017-01-04 01:13:57 +01:00
QJsonModel.cpp Properly ensure that all header files are passed through moc and that moc_sources are added to each compilation target. 2024-05-02 19:42:26 -04:00
README.md Update screenshot reference in README.md and update build instructions 2024-05-02 19:50:52 -04:00
screen.png change license to MIT, make code simple, add C++11 feature 2017-01-06 19:53:45 +01:00

QJsonModel

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.

QJsonModel

Build Instructions

Build Tools

  • CMake (version 3.21 or higher)
  • C++17-compatible compiler

Building the Project

  1. Clone the repository:

    git clone <URL>
    
  2. Navigate to the project directory:

    cd  elemental-game
    
  3. Configure your build system:

    cmake -B debug -G Unix Makefiles
    # or
    cmake -B debug -G Ninja   # this is faster and more modern
    
  4. Invoke your build system

    cmake --build debug
    

Usage - CMake

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

Usage - C++

QJsonModel * model = new QJsonModel;
QTreeView * view = new QTreeView;
view->setModel(model);
model->load("example.json")