The app I'm creating is relative to the network.I want it to check if the username/password is valid when it starts.And while validating,nothing can the user do.I also want to make the UI responsible.So I think of QEventLoop(I guess that's what I need,right?)
Here,I use validate() to check the info.
bool MyApp::validate()
{
QString requestURL
= "http://xxxxxx.com/check?username=aaa&password=bbb";
QNetworkReply* reply= manager.get(QNetworkRequest(requestURL));
....
}
bool MyApp::validate()
{
QString requestURL = "http://xxxxxx.com/check?username=aaa&password=bbb";
QNetworkReply* reply= manager.get(QNetworkRequest(requestURL));
....
}
To copy to clipboard, switch view to plain text mode
HOW do I use QEventLoop inside the validate(),so that I can return ture/false,when the server tells me whether the info is correct.
Bookmarks