Porting enums from PyQT5 to PyQt6

Patrick Stinson patrickkidd at gmail.com
Tue Oct 18 22:32:00 BST 2022


Just double checking here before I port a whole bunch of code.

It looks like Qt enums in PyQt6 now subclass python's `Enum` class - and so
need to have the enum class name added whenever referencing enum values.
Correct?

For example: QFont.Medium

must become QFont.Weight.Medium

Or is there a way to avoid changing all references to Qt enum values while
staying with good practices?

Cheers,
-Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20221018/2ed15320/attachment.htm>


More information about the PyQt mailing list