I've read through the QtScript docs, and as I understand it, to enable QObject derived objects to be available in scripts, I have to do something like this: -
Qt Code:
  1. QScriptEngine engine;
  2. QObject *someObject = new MyObject;
  3. QScriptValue objectValue = engine.newQObject(someObject);
  4. engine.globalObject().setProperty("myObject", objectValue);
To copy to clipboard, switch view to plain text mode 

That's fine, and makes sense. However, I want the scripts to be able to use Qt's built-in objects, such as QDialog and other UI widgets, QFile, QDir, and many more. Is this only possible by manually setting each object as in the above code? Or did I miss something in the documentation...?

Thanks