Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT 5.5.1 ActiveX dynamicCall can not return correctly！
look this codes:
QAxObject* doc ;
QAxObject* my_docs ;
QAxObject* my_app = new QAxObject;
doc = my_docs->querySubObject("Open(const QVariant&, const QVariant&,const QVariant&, const QVariant&, const QVariant&, const QVariant&,const QVariant&)",
int ret = wordapp->dynamicCall("GetDocumentCount()").toInt(); //I thisk the correct return result is 1 ,but is 0;
please tell me why is not return 1 or why it is wrony??
it return a Variant
if the method does not return a value or when the function call failed this function returns an invalid QVariant object."
so did you check with QVariant isValid() that the call does even have success ?
thank you very much!
the function name is not correctly which I passed, and the right function name is just like "DocumentCount",it is no Get before. <_>
and no () also I guess ?
Good found :)
yes, your guess are right, propertys get or set interface are no ()!
maybe this has some connection with the name of windows COM components propertys that called by QT dynamicCall("") .