|Home | Tutorial | Classes | Functions | QSA Workbench | Language | Qt API | QSA Articles | Qt Script for Applications |

[Prev: Classes and Methods] [Home] [Next: Comments]

#### Class Properties

A property is an undeclared variable that can be written to and accessed if the class supports properties. The classes supporting properties are Object, the application objects and the classes provided by the object and wrapper factories.

    var obj = new Object
    object.myProperty = 100;

The class Object does not define the variable `myProperty`, but since the class supports properties, we can define the variable with that name on the fly and use it later. Properties are associated with the object they are assigned to, so even though the object `obj` in the example above gets the property `myProperty`, it does not mean that other objects of type `Object` will have the `myProperty` property, unless explicitly stated.

[Prev: Classes and Methods] [Home] [Next: Comments]