Re: Attribute type change problem while using Qt 5.12 / PyQt 5.12.1 and wildcard imports
Umit Oztosun <[email protected]>
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <[email protected]> |
> On 1 May 2019, at 18:34, Kyle Altendorf <[email protected]> wrote: > > On 2019-05-01 05:55, Ümit Öztosun wrote: >> 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. > > What about this? Maybe check it in both the 'working' and 'non-working' scenarios. > > import PyQt5.QtCore > print(PyQt5.QtCore.True) > print(PyQt5.QtCore.__all__) Hi Kyle, Checked that but PyQt5.QtCore does not have True or __all__ in both installations. >>> PyQt5.QtCore.__all__ Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'PyQt5.QtCore' has no attribute '__all__' Regards, Umit Oztosun _______________________________________________ PyQt mailing list [email protected] https://www.riverbankcomputing.com/mailman/listinfo/pyqt