Attribute type change problem while using Qt 5.12 / PyQt 5.12.1 and wildcard imports
Ümit Öztosun <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <CAO=bG-7rqd3JuUHN8h+4rVeDAzMkt-fetKbF5GWj4nz2+tSYDg@mail.gmail.com> |
Hello,
I have encountered a weird problem using PyQt 5.12.1 and Qt 5.12. Take
the following script:
from PyQt5.QtCore import *
class A(QObject):
flag = True
a = A()
print a.flag
This outputs QCborSimpleType.True. Boolean attribute somehow converted to
a QCborSimpleType. However, just changing the wildcard import corrects
output:
from PyQt5.QtCore import QObject
class A(QObject):
flag = True
a = A()
print a.flag
Output is True this time.
I have tried various configurations, here are the wildcard import test
outputs: (Qt/Sip/PyQt all are compiled from source)
Ubuntu 18.04 / Qt-5.12.3 / sip-4.19.16 / PyQt5_gpl-5.12.1
=> QCborSimpleType.True
Ubuntu 18.04 / Qt-5.12.3 / sip-4.19.16 / PyQt5_gpl-5.12.2.dev1904191828
=> QCborSimpleType.True
MacOS 10.14.4 / Qt-5.12.3 / sip-4.19.16 / PyQt5_gpl-5.12.1
=> QCborSimpleType.True
Ubuntu 18.04 / Qt-5.11.3 / sip-4.19.16 / PyQt5_gpl-5.12.1
=> True
Problem only occurs while using Qt-5.12. Using Qt-5.11 brings things to
normal. AFAIK CBOR support was added in Qt 5.12 and this may be related:
https://doc.qt.io/qt-5/whatsnew512.html
Any ideas?
--
Regards,
Umit Oztosun
_______________________________________________
PyQt mailing list [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt