Thanks for reply,
Here the some changes i made
void AppApi::replyFinished(QNetworkReply* reply)
{
qDebug() << "replyFinished" << reply;
reply->deleteLater();
}
void AppApi::replyFinished(QNetworkReply* reply)
{
qDebug() << "replyFinished" << reply;
reply->deleteLater();
}
To copy to clipboard, switch view to plain text mode
Here the UserApi class:
#include "../appapi.h"
class UserApi : public AppApi
{
public:
UserApi();
void sendMessage();
};
#include "../appapi.h"
class UserApi : public AppApi
{
public:
UserApi();
void sendMessage();
};
To copy to clipboard, switch view to plain text mode
#include "userapi.h"
UserApi::UserApi()
{
}
{
// Processing content, etc
AppApi api;
api.makeRequest();
}
#include "userapi.h"
UserApi::UserApi()
{
}
QString UserApi::sendMessage()
{
// Processing content, etc
AppApi api;
api.makeRequest();
}
To copy to clipboard, switch view to plain text mode
Somewhere in code
UserApi *c = new UserApi;
c->sendMessage();
UserApi *c = new UserApi;
c->sendMessage();
To copy to clipboard, switch view to plain text mode
Raises Segmentation fault.
I know it's a lame code, but after 2 years of Python i forgot even a basics of C++ and it's my first project in Qt.
Can you explain how properly i make request from UserApi (for example) and return response.
Best regards
Bookmarks