Rodrigo Alves
22nd November 2012, 00:58
So, I'm using a QNetworkRequest to get request from my website.
This is the code:
QNetworkRequest WebContact::getRequest()
{
QNetworkRequest request;
request.setUrl(QUrl(contactURL));
request.setHeader(QNetworkRequest::ContentTypeHead er,QVariant("application/x-www-form-urlencoded"));
return request;
}
When running on Qt Creator, the contactURL works perfectly both for HTTP and HTTPS.
However, when I compile and run outside Qt Creator, only the HTTP that works. Am I forgetting to add a library or something?
This is the code:
QNetworkRequest WebContact::getRequest()
{
QNetworkRequest request;
request.setUrl(QUrl(contactURL));
request.setHeader(QNetworkRequest::ContentTypeHead er,QVariant("application/x-www-form-urlencoded"));
return request;
}
When running on Qt Creator, the contactURL works perfectly both for HTTP and HTTPS.
However, when I compile and run outside Qt Creator, only the HTTP that works. Am I forgetting to add a library or something?