Qt 4.8
Functions
qaxscriptwrapper.cpp File Reference
#include "qaxobject.h"
#include <ActiveQt/qaxfactory.h>
#include <qt_windows.h>

Go to the source code of this file.

Functions

QAxBaseqax_create_object_wrapper (QObject *object)
 

Function Documentation

◆ qax_create_object_wrapper()

QAxBase* qax_create_object_wrapper ( QObject object)

Definition at line 51 of file qaxscriptwrapper.cpp.

Referenced by QAxScriptManager::addObject(), and QAxScriptEngine::scriptLanguage().

52 {
53  IDispatch *dispatch = 0;
54  QAxObject *wrapper = 0;
55  qAxFactory()->createObjectWrapper(object, &dispatch);
56  if (dispatch) {
57  wrapper = new QAxObject(dispatch, object);
58  wrapper->setObjectName(object->objectName());
59  dispatch->Release();
60  }
61  return wrapper;
62 }
QAxFactory * qAxFactory()
Definition: qaxserver.cpp:81
QString objectName
the name of this object
Definition: qobject.h:114
The QAxObject class provides a QObject that wraps a COM object.
Definition: qaxobject.h:54
void setObjectName(const QString &name)
Definition: qobject.cpp:1112
virtual bool createObjectWrapper(QObject *object, IDispatch **wrapper)
Reimplement this function to provide the COM object for object in wrapper.