Qt Json Tree Model
Go to file
sacha schutz 1386e400fd
Merge pull request #9 from marcelino-m/master
Fix: Root TreeItem (Object and  Array) are not editable
2018-11-25 11:13:52 +01:00
.gitignore init repo 2015-01-22 08:24:08 +01:00
LICENSE change license to MIT 2017-01-04 01:13:57 +01:00
main.cpp change license to MIT, make code simple, add C++11 feature 2017-01-06 19:53:45 +01:00
qjsonmodel.cpp Merge pull request #9 from marcelino-m/master 2018-11-25 11:13:52 +01:00
qjsonmodel.h Update constructor 2018-07-16 14:59:37 -03:00
QJsonModel.pro Fix QJsonModel.pro 2018-03-21 16:49:28 -03:00
qjsonmodel.py Implement support for Python 2018-05-06 16:21:02 +09:00
README.md Add instructions for installation of dependencies 2018-05-06 21:04:18 +09: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 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))