Qaxobject类学习笔记

因为编程时需要利用com/ocx组件等开发,经常用到qaxwidget、qaxbase、qaxobject,经常用qt的自带dumpcpp生成的cpp和h文件部分函数无法使用,所以要直接用qaxobject去操作组件,我把常用的函数和功能梳理出来,以供后面忘了查备。(QT版本:qt5.9.1 msvc2015)

使用上述的类,必须在.pro文件里面加上

QT +=axcontainer

首先,看qaxobject的类信息

Inherits:

QObject andQAxBase


  • 19 public functions inherited from QAxBase


 

QAxBase(IUnknown *iface = Q_NULLPTR)

virtual

~QAxBase()

QVariant

asVariant() const

virtual void

clear()

QString

control() const

void

disableClassInfo()

void

disableEventSink()

void

disableMetaObject()

QVariant

dynamicCall(const char *function, const QVariant &var1 = QVariant(), const QVariant &var2 = QVariant(), const QVariant &var3 = QVariant(), const QVariant &var4 = QVariant(), const QVariant &var5 = QVariant(), const QVariant &var6 = QVariant(), const QVariant &var7 = QVariant(), const QVariant &var8 = QVariant())

QVariant

dynamicCall(const char *function, QList &vars)

QString

generateDocumentation()

bool

isNull() const

PropertyBag

propertyBag() const

virtual bool

propertyWritable(const char *prop) const

long

queryInterface(const QUuid &uuid, void **iface) const

QAxObject *

querySubObject(const char *name, const QVariant &var1 = QVariant(), const QVariant &var2 = QVariant(), const QVariant &var3 = QVariant(), const QVariant &var4 = QVariant(), const QVariant &var5 = QVariant(), const QVariant &var6 = QVariant(), const QVariant &var7 = QVariant(), const QVariant &var8 = QVariant())

QAxObject *

querySubObject(const char *name, QList &vars)

bool

setControl(const QString &)

void

setPropertyBag(const PropertyBag &bag)

virtual void

setPropertyWritable(const char *prop, bool ok)

QStringList

verbs() const




你可能感兴趣的:(Qaxobject类学习笔记)