V
V
Vasya Pupkin2015-12-08 22:56:44
Qt
Vasya Pupkin, 2015-12-08 22:56:44

How to enter data from a json file into a QTableView table?

There is a trip.json file for example.

{
    "name": "Hawai",
    "days": 25
}

How to load / save information from this file to / from the QTableView table ????

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2015-12-08
@Nipheris

1) create a suitable model (for example, inherit from QAbstractTableModel );
2) load data from json;
3) implement the model from clause 1 so that it returns the value of a specific property depending on the requested column;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question