I've been struggling with figuring out how to wrap the QtScript bindings (or anything else for that matter) so that the base class properties and slots are still visible to my newly created QtScript object.

For example in QtScript using bindings created by the QtBindingsGenerator I can do the following:
Qt Code:
  1. var page = new QWizardPage();
  2. var layout = new QGridLayout();
  3. page.setLayout(layout); //setLayout is actually defined in QWidget and it is accessible here
To copy to clipboard, switch view to plain text mode 
However I need access to 'protected' functionality of QWizardPage so I've been trying to create a wrapper to expose these methods without removing existing things I can call from QtScript.
Qt Code:
  1. class ScriptWizardPage : public QWizardPage
  2. {
  3. Q_OBJECT;
  4. ...
  5. public:
  6. Q_INVOKABLE void registerField(...);
  7. };
  8. Q_SCRIPT_DECLARE_QMETAOBJECT(ScriptWizardPage, QWidget*);
  9.  
  10. //Adding to engine
  11. QScriptValue newClass = engine->scriptValueFromQMetaObject(ScriptWizardPage>();
  12. engine->globalObject().setProperty("ScriptWizardPage", newClass);
To copy to clipboard, switch view to plain text mode 

By creating the ScriptWizardPage i can now access the 'registerField' method in QtScript however all of the previously exposed methods such as setLayout() are removed and I am unaware of how to keep them there without completely wrapping all functionality of a QWizardPage all the way down to QWidget -- there must be a better, less tedious way that eludes me!?