QAxObject Class
The QAxObject class provides a QObject that wraps a COM object. 更多...
公有函数
QAxObject(QObject *parent = Q_NULLPTR) | |
QAxObject(const QString &c, QObject *parent = Q_NULLPTR) | |
QAxObject(IUnknown *iface, QObject *parent = Q_NULLPTR) | |
~QAxObject() | |
bool | doVerb(const QString &verb) |
重新实现的受保护函数
virtual void | connectNotify(const QMetaMethod &signal) |
其他继承的成员
- 1 个属性继承自 QObject
- 1 个属性继承自 QAxBase
- 1 个公有槽函数继承自 QObject
- 2 个信号继承自 QObject
- 3 个信号继承自 QAxBase
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 9 个受保护的函数继承自 QObject
- 5 个受保护的函数继承自 QAxBase
- 2 个受保护的变量继承自 QObject
详细描述
The QAxObject class provides a QObject that wraps a COM object.
A QAxObject can be instantiated as an empty object, with the name of the COM object it should wrap, or with a pointer to the IUnknown that represents an existing COM object. If the COM object implements the IDispatch
interface, the properties, methods and events of that object become available as Qt properties, slots and signals. The base class, QAxBase, provides an API to access the COM object directly through the IUnknown pointer.
QAxObject is a QObject and can be used as such, e.g. it can be organized in an object hierarchy, receive events and connect to signals and slots.
QAxObject also inherits most of its ActiveX-related functionality from QAxBase, notably dynamicCall() and querySubObject().
Warning: You can subclass QAxObject, but you cannot use the Q_OBJECT macro in the subclass (the generated moc-file will not compile), so you cannot add further signals, slots or properties. This limitation is due to the metaobject information generated in runtime. To work around this problem, aggregate the QAxObject as a member of the QObject subclass.
参见 QAxBase, QAxWidget, QAxScript, and ActiveQt Framework.
成员函数
QAxObject::QAxObject(QObject *parent = Q_NULLPTR)
Creates an empty COM object and propagates parent to the QObject constructor. To initialize the object, call setControl.
QAxObject::QAxObject(const QString &c, QObject *parent = Q_NULLPTR)
Creates a QAxObject that wraps the COM object c. parent is propagated to the QObject constructor.
参见 setControl().
QAxObject::QAxObject(IUnknown *iface, QObject *parent = Q_NULLPTR)
Creates a QAxObject that wraps the COM object referenced by iface. parent is propagated to the QObject constructor.
QAxObject::~QAxObject()
Releases the COM object and destroys the QAxObject, cleaning up all allocated resources.
[virtual protected]
void QAxObject::connectNotify(const QMetaMethod &signal)
Reimplemented from QObject::connectNotify().
bool QAxObject::doVerb(const QString &verb)
Requests the COM object to perform the action verb. The possible verbs are returned by verbs().
The function returns true if the object could perform the action, otherwise returns false.
This function was introduced in Qt 4.1.