Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QScriptEngine::setDefaultPrototype ( int  metaTypeId,
const QScriptValue prototype 
)

Sets the default prototype of the given metaTypeId to prototype.

The default prototype provides a script interface for values of type metaTypeId when a value of that type is accessed from script code. Whenever the script engine (implicitly or explicitly) creates a QScriptValue from a value of type metaTypeId, the default prototype will be set as the QScriptValue's prototype.

See also:
defaultPrototype(), qScriptRegisterMetaType(), QScriptable, {Default Prototypes Example}

Definition at line 911 of file qscriptengine.cpp.

{
    Q_D(QScriptEngine);
    d->setDefaultPrototype(metaTypeId, QScriptValuePrivate::valueOf(prototype));
}


Generated by  Doxygen 1.6.0   Back to index