2017-08-04 58 views
-1

我使用 QJsonValue和 QJsonObject無法使用<QJsonValue><QJsonObject>

即使當我添加QT + =核心問題。我使用QT 5.5 有沒有人知道可能是什麼問題。 在此先感謝

+0

你是什麼意思的問題?描述問題,並把你的代碼? –

+0

我還沒有編寫任何代碼,但是當我編寫包含這些庫時,它會顯示Nosuch文件或目錄 – johnk

+0

好的,您需要提供更多信息,是否可以添加代碼行或項目文件?順便說一下,你提到的錯誤信息也會很好。 – retinotop

回答

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. 
+0

我已經解決了這個問題。我有兩個版本的QT 4.8和5.5,它使用4.8。在unistalling 4.8後,它工作。 – johnk

相關問題