[PyQt] Problem with inherits() method
John Ehresman
jpe at wingware.com
Thu Apr 27 16:12:20 BST 2017
Yes, isinstance works and finding super classes via .metaObject() works
as well. My immediate problem is that I run into failing Q_ASSERT's in
the Qt accessibility support code when using the debug builds on a mac.
Cheers,
John
On 4/26/17 5:41 PM, Hans-Peter Jansen wrote:
> Hi John,
>
> On Mittwoch, 26. April 2017 16:47:48 John Ehresman wrote:
>> The inherits() method doesn't seem to be working in PyQt5 5.8.2 w/ Qt
>> 5.8 for objects created from Python as shown be the following example at
>>
>> the interactive prompt:
>> >>> app = QtWidgets.QApplication([])
>> >>> o = QtWidgets.QStackedWidget()
>> >>> o.inherits('QObject')
>>
>> False
>>
>> >>> l = o.layout()
>> >>> l.inherits('QObject')
>>
>> True
>>
>> Both inherits() calls should return true. I've tested with a from
>> source build on mac and the pip installed wheel on 32 bit windows.
>
> Confirmed on Linux with the same versions.
>
> FWIW, isinstance works fine, though.
>
> Cheers,
> Pete
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
More information about the PyQt
mailing list