<div dir="ltr">When you set the `objectName` property of a QObject that has been registered for QML use with `qmlRegisterType`, the resulting `objectName` is not accessible in python.<div><br></div><div>See this small self-contained example of the issue:<br><div><div><br></div><div><a href="https://gist.github.com/rwarren/995e7ddc373f7119c51737fcd4aba0cc">https://gist.github.com/rwarren/995e7ddc373f7119c51737fcd4aba0cc</a><br></div><div><br></div><div>Although this can be worked around by defining a replacement `objectName` property in python (see below), it seems like this should not be required. Equivalent C++ code, for example, has no issue accessing the objectName that was set in QML.</div><div><br></div><div>The workaround is to use alternative/back-door means to set/get the `QObject.objectName` property with something like this replacement property definition in the registered class:</div><div><br></div><div><div><font face="monospace, monospace" color="#351c75">    @pyqtProperty(str)</font></div><div><font face="monospace, monospace" color="#351c75">    def objectName(self):</font></div><div><font face="monospace, monospace" color="#351c75">        return QtCore.QObject.objectName(self)</font></div><div><font face="monospace, monospace" color="#351c75"><br></font></div><div><font face="monospace, monospace" color="#351c75">    @objectName.setter</font></div><div><font face="monospace, monospace" color="#351c75">    def objectName(self, objectName):</font></div><div><font face="monospace, monospace" color="#351c75">        QtCore.QObject.setObjectName(self, objectName)</font></div></div><div><br></div><div>Is there a fundamental reason that objectName can't be accessed in PyQt? It would be nice to not have to use that workaround.</div><div><br></div><div>Russ</div><div><br></div><div><br></div></div></div></div>