Qt 4 / 5

42 views
Skip to first unread message

Terry Brown

unread,
May 3, 2016, 10:55:09 AM5/3/16
to leo-editor
[sent this to a github issue discussion by mistake]

Note: just posting thing for general qt4/5 import reference, I think
the WebKit related issues may be more about deprecation than imports.

Just found this:

https://github.com/spyder-ide/qtpy

QtPy: Abtraction layer for PySide/PyQt4/PyQt5

QtPy (pronounced 'cutie pie') is a small abstraction layer that lets
you write applications using a single API call to either PyQt or
PySide.
It provides support for PyQt5, PyQt4 and PySide using the PyQt5 layout
(where the QtGui module has been split into QtGui and QtWidgets).

Basically, you write your code as if you were using PyQt5 but import
Qt modules from qtpy instead of PyQt5.

Cheers -Terry

Edward K. Ream

unread,
May 5, 2016, 5:20:55 AM5/5/16
to leo-editor
On Tue, May 3, 2016 at 9:55 AM, 'Terry Brown' via leo-editor <leo-e...@googlegroups.com> wrote:
[sent this to a github issue discussion by mistake]

​In general, I prefer that most discussions happen in public.​
 


​The leo.core.leoQt module does the same thing.  Adding another layer exposes Leo to bugs in that layer, and would add a dependency.​
 
​ ​
Having said that, QtPy might serve as a reference.

Edward

P.S. Iirc, it doesn't seem like VR1, the original viewrendered plugin, should need to import QWebKit.  If not, #281 may have some merit after all.

​EKR

Edward K. Ream

unread,
May 5, 2016, 5:38:51 AM5/5/16
to leo-editor


On Thursday, May 5, 2016 at 4:20:55 AM UTC-5, Edward K. Ream wrote:

P.S. Iirc, it doesn't seem like VR1, the original viewrendered plugin, should need to import QWebKit.  If not, #281 may have some merit after all.

My memory was faulty.  The plugin does need QtWebKitWidgets, and the top-level init method is justified in returning False if QtWebKitWidgets has not been imported.

EKR
Reply all
Reply to author
Forward
0 new messages