PDA

View Full Version : QtWebView



santhoshpatil
21st September 2010, 06:49
hi everyone

I am a beginner to Qt,i am using QWebView to build small application in which ,from the client side i request for the Html page to the server,i am able to display the requested HTML page in the client side..but i am not able to navigate through any of the hyperlinks.Here is My code


QwebView *WebView = new QwebView();
WebView->load(QUrl("http://servername/XYZ.html"));
WebView->show();
However i am able load to XYZ.html successfully.but when i click the hyperlinks in XYZ.html,i am not able to see anything .

connect(WebView,SIGNAL(linkClicked(const QUrl&),this,LinkChanged(const QUrl&)));

and my slot looks like this
void LinkChanged(const QUrl& link)
{
WebView->load(QUrl(link));
WebView->show();

}

i have connect the linkclicked signal to the LinkChanged slot..i am getting the control to the slotalso.but QUrl parameter what i am passing is not getting the valid Url name.please suggest me if i have done something wrong in the code.

please help in this regards

Thanks
santhosh Patil

wysota
21st September 2010, 07:02
Is your slot a stand-alone function or a method of some class?

santhoshpatil
21st September 2010, 11:52
Its a method of a class

wysota
21st September 2010, 11:59
Is it executed at all? Basically you shouldn't need this slot at all. Try removing the connection and see if it helps.

santhoshpatil
23rd September 2010, 07:08
Hi

I tried by removing the slot ..its not working