PlotPyStack / PythonQwt

Qt plotting widgets for Python (pure Python reimplementation of Qwt C++ library)
https://pypi.org/project/PythonQwt/
Other
86 stars 25 forks source link

Use qtpy. Adaptations for PySide2. #53

Closed mvillion closed 4 years ago

mvillion commented 5 years ago

Hello,

PythonQwt is still among the fastest plotting libraries and it provides means to prototype in Python a Qt/C++ program using Qwt. I wanted to test PySide2 compatibility. To do so:

  1. ".qt" was replaced by qtpy as it provides PySide2 support.
  2. A few modifications were needed for PySide2 (keywords PYSIDE2 and @todo).

Note that implementation is much slower due a for loop in qwt/plot_curve.py.

Hope it can be useful.

Best regards,

stonebig commented 5 years ago

where did you get that guidata-1.7+ ?

mvillion commented 5 years ago

sudo pip3 install guidata

(available versions: 1.2.4.2, 1.2.5, 1.3.2, 1.4.1, 1.5.1, 1.6.1, 1.7.5, 1.7.6)

find . -name "*.py" | xargs grep guidata ./setup.py: 'Tests': ["guidata>=1.7.0"], ./qwt/tests/init.py: """Run PythonQwt test launcher (requires guidata)""" ./qwt/tests/init.py: from guidata.guitest import run_testlauncher ./qwt/tests/init.py: raise ImportError("This feature requires guidata 1.7+.") ./qwt/py3compat.py:guidata.py3compat (exact copy of spyderlib.py3compat)

I did test manually on all files in .../PythonQwt/qwt/tests export QT_API=pyside2 export PYTHONPATH=/PythonQwt

As the test launcher uses guidata, guidata would need to be modified too for PySide2.

stonebig commented 5 years ago

ok, I'll use my [ugly] guidata patch proposal for it.

stonebig commented 4 years ago

pyside2 is now 33% the download count of PyQt5... having PythonQwt compatibility would be nice,

PierreRaybaut commented 4 years ago

Now testing a new branch with PySide2 compatibility: https://github.com/PierreRaybaut/PythonQwt/tree/QtPy

Compatibility with PySide2 has never been so close. :)