nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.53k stars 130 forks source link

Dock Area resource file needs to be fixed for Qt6 #487

Closed bburan closed 2 years ago

bburan commented 2 years ago

It looks like enaml/qt/docking/dock_resources.py is pretty important for getting the nice, clean hints that pop-up when attempting to dock windows (i.e., the compass rose). However, qRegisterResourceData appears to be missing from PyQt6.QtCore and I can't find any guidance on the appropriate replacement. For example, it looks like we are still supposed to use rcc to convert to a Python module (e.g., https://doc.qt.io/qt-6/resources.html). Yet, the file that's created imports QtCore from PySide6 instead of PyQt6.

It seems that we still have PySide6.QtCore.qRegisterResourceData but not PyQt6.QtCore.qRegisterResourceData. If I install PySide6, then the compass rose image appears nicely.

I'm a bit unsure about the best path forward here to ensure compatibility with PyQt6 as well. Thoughts?

MatthieuDartiailh commented 2 years ago

This was apparently discussed on the mailing list of pyqt, as mentioned here. https://stackoverflow.com/questions/66099225/how-can-resources-be-provided-in-pyqt6-which-has-no-pyrcc

We need to see what appears the best solution for us.

bburan commented 2 years ago

Thanks for tracking down that discussion. That helped orient me in the right direction. Luckily the answer seems to be straightforward.