Q_ENUMS alternative help.

Phil Thompson phil at riverbankcomputing.com
Sat Apr 10 16:19:03 BST 2021


On 09/04/2021 19:16, José Antonio Fernández Fernández wrote:
> Hello everyone, let's see if you can help me with this.
> This widget example (designer plugin) works in PyQt5 versions that had 
> the
> Q_ENUMS function available (old_ok.py).
> 
> Now when I try to load with PyQt6 (new_bad.py), which changes Q_ENUM to
> pyqtEnum, I get the following error:
> 
> ...
> selectionMode = QtCore.pyqtProperty(
> SystemError: <class 'PyQt6.QtCore.pyqtProperty'> returned a result with 
> an
> error set
> 
> 
> 
> I know I'm doing it wrong, but if someone explains to me how to fix it,
> with an example I would really appreciate it.

https://www.riverbankcomputing.com/static/Docs/PyQt6/metaobjects.html#pyqtenum

Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: old_ok.py
Type: text/x-python
Size: 634 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210410/8e9e183d/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_bad.py
Type: text/x-python
Size: 639 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210410/8e9e183d/attachment-0001.py>


More information about the PyQt mailing list