How to keep the way of using enum as sip 5 for sip 6?
Weitian Leung
weitianleung at gmail.com
Tue Jan 12 05:19:36 GMT 2021
>
> - All enums are now implemented as enum.Enum (PyQt5 used enum.IntEnum for
> scoped enums and a custom type for traditional named enums). PyQt5 allowed
> an int whenever an enum was expected but PyQt6 requires the correct type.
> - QFlags are implemented as enum.Flag.
As mentioned in PyQt6 released news, I found this also affected non-PyQt
project with sip 6, such as:
> namespace demo {
> enum Hello {
> World = 0
> }
> }
>
Will not possibly be used as *demo.World* with python. Searching the
document found the /NoScope/ but didn't help, it just failed to compile.
The only way for now I can see is removing the enum name (Hello for
example), but it's just too weird.
Is there another way to make enum compatible with sip 5?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210112/c2f20b98/attachment.htm>
More information about the PyQt
mailing list