On Tuesday, October 31, 2017 at 12:07:21 PM UTC-5, Edward K. Ream wrote:

    There was only *one significant change*, marked with ### in 
> webengineview.py:
>     - Change QtWebEngineWidgets to QtWebKitWidgets *as defined in 
> leoQt.py*.
>       Yes, this is truly horrible, but the leoQt code is more careful 
> about failing imports.
>

A better description is that the names in leoQt are preferred throughout 
Leo.  Here is part of the docstring for leoQt.py:

Callers are expected to use the *PyQt5* spellings of modules:
- Use QtWidgets, not QtGui, for all widget classes.
- Use QtGui, not QtWidgets, for all other classes in the *PyQt4* QtGui 
module.
- Similarly, use QtWebKitWidgets rather than QtWebKit.

Some names are particularly messy, because Qt has been mucking about with 
them. The relevant code is:

    try:
        import PyQt5.QtWebKitWidgets as QtWebKitWidgets
    except ImportError:
        try:
            # 
https://groups.google.com/d/msg/leo-editor/J_wVIzqQzXg/KmXMxJSAAQAJ
            # Reinhard: Support pyqt 5.6...
            # used by viewrendered(2|3).py, bigdash.py, richtext.py.
            import PyQt5.QtWebEngineWidgets as QtWebKitWidgets
            QtWebKitWidgets.QWebView = QtWebKitWidgets.QWebEngineView
            QtWebKit.QWebSettings = QtWebKitWidgets.QWebEngineSettings
            QtWebKitWidgets.QWebPage = QtWebKitWidgets.QWebEnginePage
        except ImportError:
            QtWebKitWidgets = None

*Note*: even though pylint is happy, I may have gotten the changes 
backwards or otherwise wrong.  Please don't assume I have thoroughly tested 
the code.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to