from PySide2.QtCore import QObject, Property class SomeObject(QObject): _value = 'ConstantValue' constantValue = Property(str, lambda self: self._value, constant=True) obj = SomeObject() metaObject = obj.metaObject() # fails with PySide2 5.12, worked before assert metaObject.property(metaObject.indexOfProperty("constantValue")).isConstant()