Answer the question
In order to leave comments, you need to log in
Question on QUrl, why sends a request 4 times?
I send a simple get request to the server, and for some reason it is sent 4 times when the button is pressed 1 time.
here is a sample code:
QString request{"http://ipAddress:port/?action=user.signin&login=" +
QString::fromStdString(this->_user) + "&pass=" + QString::fromStdString(this->_pwd)};
QUrl url;// = QUrl::fromEncoded(request);
if (!url.isValid())
url.setUrl(request);
QNetworkAccessManager *mng = new QNetworkAccessManager(Q_NULLPTR);
connect(mng, SIGNAL(finished(QNetworkReply*)), SLOT(responceJson(QNetworkReply*)));
QNetworkRequest req(url);
mng->get(req);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question