Qt:Документация 4.3.2/qaxobject

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QAxObject Class Reference
[ QAxContainer module]

The QAxObject class provides a QObject that wraps a COM object. Далее...

 #include <QAxObject>

Inherits QObject and QAxBase.

Inherited by QAxScriptEngine.

[править] Открытые функции

  • 29 открытых функций, унаследованных от QObject
  • 19 public functions inherited from QAxBase

[править] Дополнительные унаследованные члены

  • 1 свойство, унаследованное от QObject
  • 1 property inherited from QAxBase
  • 1 открытый слот, унаследованный от QObject
  • 1 сигнал, унаследованный от QObject
  • 3 signals inherited from QAxBase
  • 5 статических открытых членов, унаследованных от QObject
  • 7 защищенных функций, унаследованных от QObject
  • 5 protected functions inherited from QAxBase

[править] Подробное описание

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.

See also QAxBase, QAxWidget, QAxScript, and ActiveQt Framework.


[править] Описание функций-членов

[править]
QAxObject::QAxObject ( QObject * parent = 0 )

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 = 0 )

Creates a QAxObject that wraps the COM object c. parent is propagated to the QObject constructor.

See also setControl().

[править]
QAxObject::QAxObject ( IUnknown * iface, QObject * parent = 0 )

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.

[править]
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.

Эта функция была введена в Qt 4.1.



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2