That is very long and intimidating.
Anyway, I got setcookiesforUrl() and cookiesforUrl() done without that.
But I don't want to use global variable and my read all data is in another function.
I want to return it like this :
connect(loginnam, finished(...), this, readdata(...);
{
reply->readall.....
}
//Want to return slot values
QByteArray data = emit finished(QNetworkReply*);
connect(loginnam, finished(...), this, readdata(...);
QByteArray readdata()
{
reply->readall.....
}
//Want to return slot values
To copy to clipboard, switch view to plain text mode
//This code below is the same cause can't get the return value
//In case someone said you can't emit finished or what lol
connect (loginnam, finished(), this, getdata())
{
//Emit here
return returnvalue;
}
{
reply->readall.....
}
//This code below is the same cause can't get the return value
//In case someone said you can't emit finished or what lol
connect (loginnam, finished(), this, getdata())
QByteArray MainWindow::getdata()
{
//Emit here
QByteArray returnvalue = emit readdata();
return returnvalue;
}
QByteArray readdata()
{
reply->readall.....
}
To copy to clipboard, switch view to plain text mode
There's no finished signal except using connect with sender as qnetworkaccessmanager object. So I can't use emit finished......
Is there any solutions to return the slot value with signal as finished? Other than private variables
It's unnecessary question cause I have two global variable to be used globally already, but I would like to know how to do it.
Bookmarks