Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
QHttp ID
Hello I send yarious posts to a server. For this I use the following method which returns an id.
int post ( const QString & path, QIODevice * data, QIODevice * to = 0 )
Lets say I have three posts. So i defined three global int variables for the return value of the
post statement.
As signal I use void requestFinished ( int id, bool error ).
In the slot to the requestFinished signal i used the following code
if (variable1==id){.....}
if (variable2==id){.....}
if (variable3==id){.....}
So is this right what I am doing here or is there another way. to do it without defining global variables.
Thanks very much for your answers
RE: QHttp ID
You can have class member variables or for example a map of some request descriptions to know what id corresponds to what request.