<div dir="ltr">We all know that we can create custom QObject properties using the `pyqtProperty` function/decorator.<div><br></div><div>As far as I know, though, there is a small drawback: those properties do not behave "exactly" like other QObject properties: the small (but somehow code-wise significant) difference is that PyQt created properties are accessible as python properties (<font face="monospace">self.somePyQtProperty</font>) and not like other Qt properties (<font face="monospace">self.someQtProperty<b>()</b></font>, note the parentheses).<br><br>I know that this might seem trivial, but it's something that has slightly buggered me for some amount of time, mostly because I often use the QObject constructor to automatically set properties.</div><div><br></div><div>From the basic code perspective it's not that an issue: I could set a custom property to _someProperty and then create the related <font face="monospace">someProperty()</font> and <font face="monospace">setSomeProperty(value)</font> functions for "readability" reasons, but since I'm using some custom made plugins in designer I'd prefer to keep property names as clean as possible there too.</div><div>Obviously, using <font face="monospace">def someProperty(self):</font> after the property declaration is not an option, as it would make property access unavailable.<br></div><div><br></div><div>Note that I don't really care for some further lines in the class definition/constructor; what I'd really prefer is to always have a consistent way to access properties if they *also are* Qt properties.<br clear="all"><div><br></div><div>So, the question: is there a way or workaround to allow creating a Qt property on PyQt that is still accessible using the <font face="monospace">self.property()</font> syntax, while keeping the property name intact?</div><div><br></div><div><br></div><div>Thanks,</div><div>Maurizio</div>-- <br><div dir="ltr" data-smartmail="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div></div></div>