Image format changed ?

Vincent Vande Vyvre vincent.vande.vyvre at telenet.be
Wed Aug 24 10:39:01 BST 2022


On 24/08/22 11:19, Florian Bruhin wrote:
> 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
>
OK, thanks Florian.



More information about the PyQt mailing list