Porting enums from PyQT5 to PyQt6
me at the-compiler.org
Wed Oct 19 18:15:26 BST 2022
On Tue, Oct 18, 2022 at 01:32:00PM -0800, Patrick Stinson wrote:
> 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.
> 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?
There are at least three tools available to automate the changes:
me at the-compiler.org | https://www.qutebrowser.org
https://bruhin.software/ | https://github.com/sponsors/The-Compiler/
GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available
More information about the PyQt