Skip to content

mattcarter11/QJsonModel-PySide6

 
 

Repository files navigation

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))

About

Qt Json Tree Model for PySide6

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 64.4%
  • Python 34.0%
  • QMake 1.6%