[Interest] a question about QNetworkAccessManager
marten.nordheim at qt.io
Wed Mar 20 11:36:25 CET 2019
One QNetworkAccessManager (QNAM for short) will be enough in your case as well. The signals on QNAM all pass a pointer to the QNetworkReply so you can know which it relates to.
Although perhaps more fitting for your usecase may be to use the signals on QNetworkReply instead of QNAM https://doc.qt.io/qt-5/qnetworkreply.html#finished?
From: Matej Košík<mailto:misc at matej-kosik.net>
Sent: onsdag 20. mars 2019 10:47
To: interest at qt-project.org<mailto:interest at qt-project.org>
Subject: [Interest] a question about QNetworkAccessManager
I am new to Qt.
Yesterday, I have learned about:
(as I wanted to figure out how to make HTTP GET/POST request and process the responses).
One QNetworkAccessManager instance should be enough for the whole Qt application.
I do not understand what do I gain by that.
Our application makes different HTTP requests.
Each response must be handled differently.
Why would we want to pipe all "finished" signals (generated by the QNetworkAccessManager) to the same set of slots?
What sense would that make?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest