In this commit I compile 6.52 version into 5.90 And I was able to extract any object in the JSON provided by www.baidu.com Server In next Version. I will add an camera to read Image and deliver it to Server.
45 lines
616 B
C++
45 lines
616 B
C++
#ifndef GETACCESSTOKEN_H
|
|
#define GETACCESSTOKEN_H
|
|
|
|
#include <QObject>
|
|
|
|
#include<QNetworkAccessManager>
|
|
#include<QNetworkReply>
|
|
#include<QNetworkRequest>
|
|
|
|
#include<QJsonDocument>
|
|
#include<QJsonObject>
|
|
|
|
#include<QDebug>
|
|
|
|
class GetAccessToken : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit GetAccessToken(QObject *parent = nullptr);
|
|
|
|
|
|
QString GiveMeAccess();
|
|
void SendHttp();
|
|
|
|
signals:
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
private:
|
|
QNetworkReply * Rpl;
|
|
QNetworkAccessManager * Manager;
|
|
QNetworkRequest Rst;
|
|
|
|
|
|
QJsonDocument JSD;
|
|
QJsonObject JSO;
|
|
|
|
QString AcessToken;
|
|
|
|
};
|
|
|
|
#endif // GETACCESSTOKEN_H
|