Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt for Python UsingQtProperties
English 한국어
Using Qt Properties in PySide
PySide provides a
Property
function which allows for declaring properties that simultaneously behave both as Qt and Python properties, and have their setters and getters defined as Python functions.
A short example illustrating defining and accessing a Qt property from Python is given below:
The complete specification for PySide’s property system is given in PSEP 103 [web.archive.org].
Properties in QML expressions
If you are using properties of your objects in QML expressions, QML requires the property to be NOTIFYable. This can be done using a simple signal:
Emit the signal when the data changes, and QML will automatically update all expressions depending on the value.