Open yusup209 opened 4 years ago
Aw, I've been late :( but anyway...
You should add path of qjsontablemodel.cpp to your project(int .pro file), like that:
SOURCES += \
main.cpp \
mainwindow.cpp \
D:/Qt/Qt5.12.10/5.12.10/mingw73_32/include/QtCore/qjsontablemodel.cpp
and you will be able to include qjsontablemodel.h to your project Hope it helps
Hi. When i initialize new QJsonTableModel, i got an error says
error: undefined reference to
QJsonTableModel::QJsonTableModel(QVector<QMap<QString, QString> > const&, QObject*)`Here is the code.
` void MainWindow::LoadDataFromJson(){ QNetworkAccessManager *man = new QNetworkAccessManager(this);
} void MainWindow::LoadDataFromJsonResponse(QNetworkReply* repl){ qDebug() << "getting response..."; QString response = repl->readAll(); QJsonDocument doc = QJsonDocument::fromJson(response.toUtf8()); QJsonObject obj = doc.object();
} `
here is the code screenshot : https://imgur.com/M0JLlwe the json : https://imgur.com/a/mL9RmLN
Thank you.