pyqtkeybind icon indicating copy to clipboard operation
pyqtkeybind copied to clipboard

Is there any plan to update this module to support PYQT6?

Open valuex opened this issue 1 year ago • 5 comments

Thanks for sharing this module. Is there any plan to update this module to support PYQT6?

valuex avatar Jul 01 '23 00:07 valuex

@valuex sorry, there is no plan due to lack of bandwidth :( Happy to accept patches if anyone from community is willing to contribute.

codito avatar Jul 05 '23 04:07 codito

I presume you would be okay with simultaneously adding support for the QtPy abstraction layer? That would make the project enhancement more attractive.

damonlynch avatar Sep 23 '23 02:09 damonlynch

@damonlynch yes, QtPy will be a great addition!

I believe some of the core APIs around native event handlers have changed across PyQt5 to PyQt6. Hopefully QtPy may already have a common abstraction for these. For reference, here are differences from the C++ equivalent of this library: https://github.com/Skycoder42/QHotkey/blob/master/QHotkey/qhotkey_x11.cpp (search for QT_VERSION).

codito avatar Sep 23 '23 03:09 codito

https://github.com/codito/pyqtkeybind/pull/30 helped add Windows support for PyQt6 (thanks damonlynch@).

Re X11, I think we're blocked on availability of an API to get the underlying X11 connection (QGuiApplication.nativeInterface, see this commit in QtBase). I tried creating another connection with xcffib.connect() but the GrabKey fails for this. If anyone has additional ideas to explore, please suggest.

codito avatar Dec 03 '23 15:12 codito

@codito regarding X11, this code may (or may not) be relevant:

https://github.com/retext-project/retext/blob/master/ReText/xsettings.py

The developer of that code is highly-skilled. He is the PyQt packager for Debian.

It's GPL so cannot be dropped-in to this project. However, it may suggest a way forward? I don't know. X is far from my area of expertise.

damonlynch avatar Jan 21 '24 23:01 damonlynch