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

List:       pykde
Subject:    Re: TypeError: QImage.sizeInBytes() is a private method
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2020-05-22 13:16:45
Message-ID: f37369fdd7cad1386bd7512e616c9973 () riverbankcomputing ! com
[Download RAW message or body]

On 22/05/2020 11:20, Florian Bruhin wrote:
> Hi again,
> 
> With Qt 5.10, QImage::byteCount() got deprecated and replaced by
> QImage::sizeInBytes():
> 
> https://doc.qt.io/qt-5/qimage-obsolete.html#byteCount
> https://doc.qt.io/qt-5/qimage.html#sizeInBytes
> 
> However, calling it from PyQt doesn't seem to work:
> 
>     >>> from PyQt5.QtGui import QImage
>     >>> img = QImage()
>     >>> img.sizeInBytes()
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in <module>
>     TypeError: QImage.sizeInBytes() is a private method
> 
> Not sure why this happens, as sizeInBytes() is under "public:" in 
> qimage.sip...
> 
> This is with Python 3.8.2, PyQt5 5.14.2, PyQt5-sip 12.7.2 and sip 
> 4.19.22 on
> Archlinux.
> 
> Florian

It's a code generation bug - fixed in tonight's SIP snapshot.

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

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