![]() |
Home · All Classes · All Functions · Overviews |
The QDeclarativeScriptString class encapsulates a script and its context. More...
#include <QDeclarativeScriptString>
This class was introduced in Qt 4.7.
QDeclarativeScriptString () | |
QDeclarativeScriptString ( const QDeclarativeScriptString & other ) | |
QDeclarativeContext * | context () const |
QObject * | scopeObject () const |
QString | script () const |
void | setContext ( QDeclarativeContext * context ) |
void | setScopeObject ( QObject * object ) |
void | setScript ( const QString & script ) |
QDeclarativeScriptString & | operator= ( const QDeclarativeScriptString & other ) |
The QDeclarativeScriptString class encapsulates a script and its context.
The QDeclarativeScriptString is used by properties that want to accept a script "assignment" from QML.
Normally, the following code would result in a binding being established for the script property. If the property had a type of QDeclarativeScriptString, the script - console.log(1921) - itself would be passed to the property and it could choose how to handle it.
MyType { script: console.log(1921) }
Construct an empty instance.
Copy other.
Return the context for the script.
See also setContext().
Returns the scope object for the script.
See also setScopeObject().
Returns the script text.
See also setScript().
Sets the context for the script.
See also context().
Sets the scope object for the script.
See also scopeObject().
Sets the script text.
See also script().
Assign other to this.
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt 4.7.0 |