[PySide] PySide > Pyside2: QWebVIew and QWebPage

Frank Rueter | OHUfx frank at ohufx.com
Sun Dec 10 06:06:05 CET 2017

Hi all,

I have this bit of code in PySide that I need to translate to work in 
The goal is to embed a functional webpage in my PySide2 application but 
delegate all clicked links to the system browser (instead of viewing 
them in the widget)

    from PySide.QtWebKit import QWebView, QWebPage

    class HtmlView(QWebView):
         def __init__(self, parent=None):
             super(HtmlView, self).__init__(parent)

I tried this for PySide2:

    from PySide2.QtWebEngineWidgets import QWebEngineView, QWebEnginePage 

    class HtmlView(QWebEngineView):
         def __init__(self, parent=None):
             super(HtmlView, self).__init__(parent)

However, /QWebEngineView.linkClicked/ does not exist and neither does 
/QWebEngineView/.setLinkDelegationPolicy or

/I'm aware that PySide2 is still alpha but I have to get this working 
somehow regardless/.
/Any help would be greatly appreciated./


ohufxLogo 50x50 <http://www.ohufx.com> 	
	*vfx compositing <http://ohufx.com/compositing.html> | *workflow 
customisation and consulting <http://ohufx.com/customising.html>* *

Your gateway to over 1,000 free tools... right inside of Nuke 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20171210/5e7818da/attachment.html>

More information about the PySide mailing list