pythonqt icon indicating copy to clipboard operation
pythonqt copied to clipboard

Contribute PythonQt support to Qt.py and/or QtPy

Open twardoch opened this issue 5 years ago • 3 comments

There are two lightweight uniform APIs that lets users write Python code that interfaces with Qt regardless of the actual Python-Qt binding:

  • QtPy: https://github.com/spyder-ide/qtpy
  • Qt.py: https://github.com/mottosso/Qt.py

They both have similar names, which is confusing, and both currently support PySide2, PyQt5 and the older versions of PySide and PyQt4. Both seem reasonably active, neither supports PythonQt.

I’m not sure how much work it would take to contribute support for PythonQt to either of these packages, but it would be terrific if some volunteer made the effort.

twardoch avatar Mar 08 '20 16:03 twardoch

Go for it!

On Sun 8. Mar 2020 at 17:43, Adam Twardoch [email protected] wrote:

There are two lightweight uniform APIs that lets users write Python code that interfaces with Qt regardless of the actual Python-Qt binding:

  • https://github.com/spyder-ide/qtpy
  • https://github.com/mottosso/Qt.py

They both have similar names, which is confusing, and both currently support PySide2, PyQt5 and the older versions of PySide and PyQt4. Both seem reasonably active, neither supports PythonQt.

I’m not sure how much work it would take to contribute support for PythonQt to either of these packages, but it would be terrific if some volunteer made the effort.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MeVisLab/pythonqt/issues/8?email_source=notifications&email_token=ABKHPHHR3BADHRL6EAFSER3RGPDKPA5CNFSM4LD26AYKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ITMMTHA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKHPHCEQJ3TLDVRHSIK4WTRGPDKPANCNFSM4LD26AYA .

florianlink avatar Mar 08 '20 16:03 florianlink

Ps. It seems that the "mottosso" project (Qt.py) is a bit more active, and it has some backing in the field of video and 3D editing.

  • https://github.com/mottosso/Qt.py/blob/master/README.md

I asked about integrating PythonQt in Qt.py ( https://github.com/mottosso/Qt.py/issues/322 ), and it’s not out of the question of course, but their response was "make PythonQt act more like PySide2". With PySide2 now being "officially backed by Qt", I guess that's inevitable.

So an alternative course of action would be of course to make, possibly, a PythonQt-to-PySide2 adapter library. I imagine that this could be done in some automated or clever fashion, but I'm not at all any good in this type of thing myself.

I would say, however, that a partial solution would be better than no solution. I believe that much of Python projects use Python-specific packages for non-UI stuff (i.e. logic) and use the Qt bindings mostly for UI.

Anyhow — from my end, right now, it's just a "I hope somebody volunteers" thing. :)

twardoch avatar Mar 08 '20 17:03 twardoch

PySide2 is "Qt inside Python". PythonQt is "Python inside Qt". Why it need to be supported in qtpy?

alex-eri avatar Jul 11 '20 14:07 alex-eri