Porting enums from PyQT5 to PyQt6

Patrick Stinson patrickkidd at gmail.com
Thu Oct 20 17:59:05 BST 2022


OK, I'll check them out. Thanks!

On Wed, Oct 19, 2022 at 9:15 AM Florian Bruhin <me at the-compiler.org> wrote:

> Hey,
>
> 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.
> > Correct?
> >
> > For example: QFont.Medium
> >
> > must become QFont.Weight.Medium
>
> Correct.
>
> > 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:
> https://www.riverbankcomputing.com/pipermail/pyqt/2022-June/044728.html
>
> Florian
>
> --
>             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 --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20221020/82c97629/attachment.htm>


More information about the PyQt mailing list