rishiraj
29th January 2009, 11:07
Hi,
I tried to implement the 'QHttp' example given in the Qt documents.
What I want is that when I click "openTrolltech",the Trolltech webpage should open up.
The code I am using is a slightly cropped version of the one given in the docs--
void ImageViewer::openurl()
{
QHttp *http=new QHttp(this);
http->setHost("www.trolltech.com");
http->get(QUrl::toPercentEncoding("/index.html"));
}
It's not showing any error but the page/Browser isn't opening up.
I added QT+=network in the .pro file and added the proper header files.
What's wrong with the code ?Please advice.
Thanks in advance.
I tried to implement the 'QHttp' example given in the Qt documents.
What I want is that when I click "openTrolltech",the Trolltech webpage should open up.
The code I am using is a slightly cropped version of the one given in the docs--
void ImageViewer::openurl()
{
QHttp *http=new QHttp(this);
http->setHost("www.trolltech.com");
http->get(QUrl::toPercentEncoding("/index.html"));
}
It's not showing any error but the page/Browser isn't opening up.
I added QT+=network in the .pro file and added the proper header files.
What's wrong with the code ?Please advice.
Thanks in advance.