[PyQt] small question (Big Stone)

David Cortesi davecortesi at gmail.com
Mon May 2 15:23:39 BST 2016


> I'm trying to tweak spyderlib code so ot works with PyQt5.6.0 on windows.
>
> I'm stuck at this problem of change of webengine:
>
>     self._webview.linkClicked.connect(self.linkClicked)
> AttributeError: 'WebView' object has no attribute 'linkClicked'
>
> Can anyone point me to an example code or documentation that tells me
> how to transform the code ?
>
> (I don't do Qt development, so my question may be super easy or super
> complex, I have no idea)
>

Very complex, probably. As you know(?), the Webkit support including
QWebView has been removed and replaced with QWebEngine. So the direct
replacement for QWebView would be QWebEngineView [0], however it does not
offer all the features of the old support.

Owing to the nature of the Chromium browser there probably is no equivalent
of the linkClicked signal. See this old forum post [1] and other posts in
the webengine forum [2]

You need to analyze what the old code wants to accomplish by looking at
every click-of-a-link and see if it can be done some other way.

[0] http://doc.qt.io/qt-5/qwebengineview.html
[1]
https://forum.qt.io/topic/49692/two-more-things-i-can-t-find-in-qwebengine-that-are-in-qwebkit
[2] https://forum.qt.io/category/54/qtwebengine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160502/62505ac0/attachment.html>


More information about the PyQt mailing list