From 87c67294301eb53c67e949ff50b991afe24d80c0 Mon Sep 17 00:00:00 2001 From: Luciano Wolf Date: Fri, 8 Oct 2010 18:13:17 -0300 Subject: Updating documentation to reflect adoption of wikipages. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Renato Araújo --- doc/property.rst | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 doc/property.rst (limited to 'doc/property.rst') diff --git a/doc/property.rst b/doc/property.rst deleted file mode 100644 index 88db8d68e..000000000 --- a/doc/property.rst +++ /dev/null @@ -1,44 +0,0 @@ -Use of QProperty in PySide -************************** - -PySide implements the function 'QProperty' which allows to declare properties compatible with QMetaProperties. - - -Using PySide.QProperty() ------------------------- - -The QProperty works like Q_PROPERTY macro, and uses the same arguments. - -QProperty(getFunction, [setFunction], [resetFunction], [Designable], [Scriptable], [Stored], [User]) - - -The example below uses QProperty function to export a property in QMetaObject data. - -:: - - ... - clas MyObject(QObject): - def getX(self): - ... - - def setX(self, value): - ... - - def resetX(self): - ... - - X = QProperty(getX, setX, resetX, True, True, True, True) - - ... - - -The exported property works like native python property on python side. See the example below. - -:: - - ... - o = MyObject() - o.X = 10 - print o.X - ... - -- cgit v1.2.3