<div dir='auto'>+1 from my side!</div><div class="gmail_extra"><br><div class="gmail_quote">Am 17.03.2021 10:50 schrieb Phil Thompson <phil@riverbankcomputing.com>:<br type="attribution" /><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On 16/03/2021 16:16, Florian Bruhin wrote:
<br>
> Hey again,
<br>
>
<br>
> On Tue, Mar 16, 2021 at 04:55:42PM +0100, Florian Bruhin wrote:
<br>
>> Or as a more compact overview:
<br>
>>
<br>
>> PyQt5: enum only (or unscoped)
<br>
>> PyQt6: flags only
<br>
>> PySide2: flags only (or unscoped)
<br>
>> PySide6: flags only (or unscoped)
<br>
>
<br>
> Well, looks like I successfully confused myself with the Alignment vs.
<br>
> AlignmentFlag names. Let me try again, please disregard the earlier
<br>
> mail.
<br>
>
<br>
> PySide2 and PySide6 both allow access via the *enum* name only. To make
<br>
> it clearer, let me try again with Qt.Orientation (enum) vs.
<br>
> Qt.Orientations (flag):
<br>
>
<br>
> PyQt5: Qt.Horizontal (unscoped) or Qt.Orientation.Horizontal (enum)
<br>
> PyQt6: Qt.Orientations.Horizontal (flag)
<br>
> PySide2: Qt.Horizontal (unscoped) or Qt.Orientation.Horizontal (enum)
<br>
> PySide6: Qt.Horizontal (unscoped) or Qt.Orientation.Horizontal (enum)
<br>
>
<br>
> So PyQt6 seems like the "oddball" here. I'm fine with using scoped
<br>
> values everywhere, but I think PyQt6 should support accessing flag
<br>
> values via the enum type, so that it's possible to write code which
<br>
> works with PyQt5 and PyQt6 (or PyQt6 and PySide6).
<br>
<br>
Generally the difference between the enum name and the flag name is that
<br>
the latter is the plural of the former. I felt that the plural form was
<br>
the better name to use as it more accurately describes the usage of the
<br>
"thing" - its a clue to the programmer that members can be ored
<br>
together. Taken in isolation I think that that was the right choice.
<br>
<br>
However, taking PyQt5 into account then I agree that the benefit is
<br>
questionable, especially considering how similar the Qt5 and Qt6 APIs
<br>
actually are. I'm happy to switch to using the enum name in v6.1 -
<br>
assuming nobody is going to argue otherwise.
<br>
<br>
Phil
<br>
</p>
</blockquote></div><br></div>