QVariant activeqt question
drdre last edited by
I'm using activeQt to call a COM dll and the function I need to use has a VARIANT* datatype as a function parameter.
From visual studio I can do the following:
(import COMClass as MFC class from type lib)
COMClass.functionToCall(&x); //this will work
but if I do this without VariantInit(&x); it won't work
Now if I do the same thing in Qt:
(use dumpcpp to generate type lib from dll and create a COMCLass object)
COMClass.functionToCall(&x); //won't work
it doesn't work. Is there any reason for this? Could it be because QVariant doesn't have a corresponding VT_EMPTY data type to initialize to?
giesbert last edited by
QVariant != VARIANT!!!
the thing you have to do it this way in MFC is that VARIANT is a structure so it has no constructor. In MFC you could use CVariant which does this implicitly.
I'm not 100% sure what to do in ActiveQ there