[Qt-interest] QWebView linkClicked(url) always null?

Israel Brewster israel at frontierflying.com
Sat Nov 28 03:23:32 CET 2009


I have the following code in my program:

  QWebView * helpWindow=new QWebView;
.
. //find the file to load here
.
helpWindow->load(QUrl("file://"+documentationLocation.absolutePath()));
helpWindow->page()- 
 >setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
connect 
(helpWindow 
,SIGNAL(linkClicked(QUrl)),this,SLOT(externalLinkClicked(QUrl)));

This much seems to work well, and when an external link is clicked,  
the function externalLinkClicked(QUrl) is called. However, for some  
reason the QUrl is invariably null - which, of course, causes problems  
the moment I try to do anything with it. What am I missing here? How  
can I get the signal to actually pass the URL? Thanks.
-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091127/95dc2d12/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Israel Brewster.vcf
Type: text/directory
Size: 417 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091127/95dc2d12/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091127/95dc2d12/attachment-0001.html 


More information about the Qt-interest-old mailing list