@nadamus said in Windows COM automation Qt and AutoCAD:
..
Now it works, but sill I wonder why it is not working with QList and QVariant.

I think the culprit is this line:

*wektor=SafeArrayCreate(VT_R8,1,&granice);

had it instead been *wektor=SafeArrayCreate(VT_VARIANT,1,&granice); then a QList<QVariant> should've worked.

Qt's COM support is kind of stuck between a rock (everything is a VARIANT, the Visual Basic COM flavor, functions are called 100% through the IDispatch interface) and a hard place (you can pass native data types like int, doubles etc through COM, the C/C++ COM flavor, functions are called through specialized interfaces based on IUnknown). I remember doing a lot COM coding around the turn of the century, it was really hot then. Nowadays not so much :-)