Image format changed ?
Florian Bruhin
me at the-compiler.org
Wed Aug 24 10:19:24 BST 2022
Hey,
On Wed, Aug 24, 2022 at 10:10:39AM +0100, vincent.vandevyvre at oqapy.eu wrote:
> In PyQt5 we can create an image with:
> img = QImage(size, QImage.Format_ARGB32_Premultiplied)
> in PyQt6 I've this error:
> AttributeError: type object 'QImage' has no attribute 'Format_ARGB32_Premultiplied'
>
> Is this a syntaxe change ?
With PyQt6, Qt enums are only accessible using there fully qualified
name, including the enum type:
QImage.Format.Format_ARGB32_Premultiplied
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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20220824/0f6ea760/attachment.sig>
More information about the PyQt
mailing list