[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Porting enums from PyQT5 to PyQt6
From:       Patrick Stinson <patrickkidd () gmail ! com>
Date:       2022-10-20 16:59:05
Message-ID: CADb17j21pz9z6Nd2JsFaaofDfHYg0VO7SKz9AtNt2c4rOtCWOQ () mail ! gmail ! com
[Download RAW message or body]

OK, I'll check them out. Thanks!

On Wed, Oct 19, 2022 at 9:15 AM Florian Bruhin <me@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@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/
>

[Attachment #3 (text/html)]

<div dir="ltr">OK, I&#39;ll check them out. Thanks!</div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 19, 2022 at 9:15 AM \
Florian Bruhin &lt;<a href="mailto:me@the-compiler.org">me@the-compiler.org</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hey,<br>
 <br>
On Tue, Oct 18, 2022 at 01:32:00PM -0800, Patrick Stinson wrote:<br>
&gt; Just double checking here before I port a whole bunch of code.<br>
&gt; <br>
&gt; It looks like Qt enums in PyQt6 now subclass python&#39;s `Enum` class - and \
so<br> &gt; need to have the enum class name added whenever referencing enum \
values.<br> &gt; Correct?<br>
&gt; <br>
&gt; For example: QFont.Medium<br>
&gt; <br>
&gt; must become QFont.Weight.Medium<br>
<br>
Correct.<br>
<br>
&gt; Or is there a way to avoid changing all references to Qt enum values while<br>
&gt; staying with good practices?<br>
<br>
There are at least three tools available to automate the changes:<br>
<a href="https://www.riverbankcomputing.com/pipermail/pyqt/2022-June/044728.html" \
rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/pipermail/pyqt/2022-June/044728.html</a><br>
 <br>
Florian<br>
<br>
-- <br>
                  <a href="mailto:me@the-compiler.org" \
target="_blank">me@the-compiler.org</a> | <a href="https://www.qutebrowser.org" \
rel="noreferrer" target="_blank">https://www.qutebrowser.org</a> <br>  <a \
href="https://bruhin.software/" rel="noreferrer" \
target="_blank">https://bruhin.software/</a> | <a \
href="https://github.com/sponsors/The-Compiler/" rel="noreferrer" \
                target="_blank">https://github.com/sponsors/The-Compiler/</a><br>
           GPG: 916E B0C8 FD55 A072 | <a href="https://the-compiler.org/pubkey.asc" \
                rel="noreferrer" \
                target="_blank">https://the-compiler.org/pubkey.asc</a><br>
                    I love long mails! | <a href="https://email.is-not-s.ms/" \
rel="noreferrer" target="_blank">https://email.is-not-s.ms/</a><br> \
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic