我使用时遇到问题 QJsonValue和 QJsonObject
即使我添加QT + =核心。 我使用的是QT 5.5 有谁知道可能是什么问题。 提前致谢
答案 0 :(得分:0)
Pro file:
QT += core gui webkit network
TEMPLATE = app
SOURCES += main.cpp \
apiservis.cpp
HEADERS += \
apiservis.h
QT = core
QT -= gui
QT += webkit
QT += webkit webkitwidgets
QT += network
TARGET = cpp
CONFIG += console
CONFIG -= app_bundle
TARGET = main
DISTFILES += \
API_kljuc.txt
And in the .h file I have:
#include <QCoreApplication>
#include <iostream>
#include <cmath>
#include <iomanip>
#include <vector>
#include <string.h>
#include <locale>
#include <sstream>
#include <fstream>
#include <string>
#include <curl/curl.h>
#include <stdio.h>
#include <QHash>
#include <QVariantMap>
#include <QWebFrame>
#include <QWebView>
#include <QNetworkReply>
#include <QCoreApplication>
#include <QDebug>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QUrl>
#include <QObject>
#include <QJsonArray>
#include <QJsonValue>
#include <QJsonObject>
But when I try to build it, error is: QJsonARRay:No such file or directory.