QScriptClassPropertyIterator Class
The QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects. More...
| Header: | #include <QScriptClassPropertyIterator> |
| qmake: | QT += script |
| Since: | Qt 4.4 |
This class was introduced in Qt 4.4.
Detailed Description
This class is only relevant if you have subclassed QScriptClass and want to provide enumeration of your custom properties (e.g. when objects of your class are used with QScriptValueIterator, or with the for-in statement in scripts).
The object() function returns the Qt Script object the iterator is traversing.
toFront(), hasNext() and next() provide forward iteration.
toBack(), hasPrevious() and previous() provide backward iteration.
name(), id() and flags() return information about the last property that was jumped over using next() or previous().
See also QScriptClass::newIterator() and QScriptValueIterator.