hlamer/qutepart — pull request #22 by mfitzp (2014-09-01 20:37:22+00:00)
Title: Add support for PyQt5 (+untested PySide) via shim qt.py

Cross-version support is added via `qt.py`, a shim that
handles the imports and incompatibilities between APIs.
Classes can then be imported from this directly to hide
these differences from the code.

This changes import style from:

from PyQt4.QtGui import QAbstractTextDocumentLayout

to:

from qutepart.qt import QAbstractTextDocumentLayout

All Qt classes are available in the root of the shim namespace.
Tests and core code has been updated to use this new style, and
tests pass with the following exceptions:

PyQt5 fails test_rectangular_selection.Test with 'Rectangular selection area is too big'
PyQt4 crashes on test_down_selects_first

A manual test using the QutePart in a PyQt4 and PyQt5 application
functions as expected.