Hi all,

I have this bit of code in PySide that I need to translate to work in PySide2. 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)
   self.page().setLinkDelegationPolicy(QWebPage.DelegateAllLinks)
            self.linkClicked.connect(self.openWebsite)


I tried this for PySide2:

from PySide2.QtWebEngineWidgets import QWebEngineView, QWebEnginePage
   class HtmlView(QWebEngineView):
        def __init__(self, parent=None):
            super(HtmlView, self).__init__(parent)
   self.page().setLinkDelegationPolicy(QWebEnginePage.DelegateAllLinks)
            self.linkClicked.connect(self.openWebsite)

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

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

--

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

Your gateway to over 1,000 free tools... right inside of Nuke <http://www.nukepedia.com/nubridge>

_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to