linux opens external links in browser now

This commit is contained in:
Jeena Paradies 2012-12-28 13:07:01 +01:00
parent 80728df815
commit 5b2157d881
2 changed files with 10 additions and 1 deletions

View file

@ -8,6 +8,7 @@ from PyQt4.QtWebKit import QWebView
class WebPage(QtWebKit.QWebPage):
def __init__(self, parent=0, app=None):
super(QtWebKit.QWebPage, self).__init__(parent)
self.setLinkDelegationPolicy(QtWebKit.QWebPage.DelegateExternalLinks)
self.app = app
def javaScriptConsoleMessage(self, message, lineNumber, sourceId):
@ -26,6 +27,7 @@ class WebViewCreator(QtWebKit.QWebView):
self.app = app
self.is_local = local
self.connect(self, SIGNAL("linkClicked (const QUrl&)"), self.app.controller.openQURL)
self.setPage(WebPage(self, self.app))
def load_local(self, callback=None):