Details
-
Suggestion
-
Resolution: Out of scope
-
P4: Low
-
4.3.0
-
None
Description
The QtScript tetrix example currently contains very ugly code for getting access to the staticQtMetaObject (Qt namespace). Since using this object is something you might want to do in other apps as well, it would be nice if there were a convenient way to access it. Perhaps we could add a QScriptEngine::qtNamespaceObject() function, so you can just do
QScriptEngine engine;
engine.globalObject().setProperty("qt", engine.qtNamespaceObject());
You then have access to enums and flags in the Qt namespace in script code (e.g. qt.Key_Left).