Python2 compatibility with PyQt4 restored.

Sat, 11 Oct 2014 12:48:50 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sat, 11 Oct 2014 12:48:50 +0200
changeset 3857
f8b548d399bc
parent 3856
98566d1d63fc
child 3858
4f4684967fee

Python2 compatibility with PyQt4 restored.

Toolbox/PyQt4ImportHook.py file | annotate | diff | comparison | revisions
diff -r 98566d1d63fc -r f8b548d399bc Toolbox/PyQt4ImportHook.py
--- a/Toolbox/PyQt4ImportHook.py	Sat Oct 11 11:13:28 2014 +0200
+++ b/Toolbox/PyQt4ImportHook.py	Sat Oct 11 12:48:50 2014 +0200
@@ -58,3 +58,9 @@
             return module
 
     sys.meta_path.insert(0, PyQt4Importer())
+    
+    if sys.version_info[0] == 2:
+        import sip
+        sip.setapi('QString', 2)
+        sip.setapi('QVariant', 2)
+        sip.setapi('QTextStream', 2)

eric ide

mercurial