QVariant activeqt question
-
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)
VARIANT x;
VariantInit(&x);
COMClass.functionToCall(&x); //this will workbut 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)
QVariant x;
COMClass.functionToCall(&x); //won't workit 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?
-
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