[Qt-interest] continue in linkClicked of QtWebView
go canal
gocanal at yahoo.com
Sat Oct 2 05:10:51 CEST 2010
Hi No'am,
Thank you for a quick response.
I simply add webView.setUrl (link), and it seems working:
private void urlClicked (QUrl link) {
System.out.println ("link click: " + link.path());
if (link!=null && link.path().endsWith("pdf")) {
QDesktopServices.openUrl(new QUrl(link));
} else
webView.setUrl(link);
} thanks,
canal
________________________________
From: "noam.rosenthal at nokia.com" <noam.rosenthal at nokia.com>
To: gocanal at yahoo.com; qt-interest at trolltech.com
Sent: Sat, October 2, 2010 11:04:09 AM
Subject: RE: [Qt-interest] continue in linkClicked of QtWebView
Hi canal
I think what you’re looking for, both for this and for the other question, is
QWebPage::acceptNavigationRequeset
(http://doc.qt.nokia.com/4.7/qwebpage.html#acceptNavigationRequest)
It’s a lower level function than the high level linkClicked signal.
Good luck
No’am
From:qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of ext go canal
Sent: Friday, October 01, 2010 7:50 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] continue in linkClicked of QtWebView
Hi,
newbie question:
I have installed my own linkClicked for QtWebView, basically I wanted to open
an external application to display PDF file (in case the link is a PDF file and
since QtWebView does not support PDF file viewing); it works but how do I let
QtWebView continue the link request if this is not a PDF file ?
thanks,
canal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101001/a20dcd4f/attachment.html
More information about the Qt-interest-old
mailing list