QJsonModel

by dridk

dridk / QJsonModel

Qt Json Tree Model

216 Stars 81 Forks Last release: Not found MIT License 38 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

QJsonModel

QJsonModel is a json tree model class for Qt5/C++11/Python based on QAbstractItemModel. QJsonModel is under MIT License.

QJsonModel

Usage C++

Add

qjsonmodel.cpp
and
qjsonmodel.h
into your project.
QJsonModel * model = new QJsonModel;
QTreeView * view = new QTreeView;
view->setModel(model);
model->load("example.json")

Usage Python

Add

qjsonmodel.py
to your
PYTHONPATH
.
$ pip install Qt.py
import json
import qjsonmodel

model = QJsonModel() view = QTreeView() view.setModel(model)

with open("example.json") as f: model.load(json.load(f))

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.