Strange behavior in PyQt6

Detlev Offenbach detlev at
Sun May 16 19:05:27 BST 2021


I am trying to read in an XML file using QXmlStreamReader class. That 
works until the moment I try to get an attribute of an element with


 >>> l=self.attributes()
 >>> l
[<PyQt6.QtCore.QXmlStreamAttribute object at 0x7ff0bb5dc040>]

Note: self is a subclass of QXmlStreamReader.

According to the Qt6 docu this call should return a QXmlStreamAttributes 
instances. However, PyQt6 returns a list and that causes a call like


to fail. Do I have to scan through this list by myself or is this an 
implementation flaw?


Detlev Offenbach
detlev at

More information about the PyQt mailing list