开发者

How do you use a derived interface from activeqt?

I've got what I think is a fairly simple interface in COM. I would like to implement it in activeqt. I am able to get an ATL prototype to work, but I would rather use qt widgets and signals than COM controls.

I can load the ATL COM dll in python's comtypes and run help(ATLDll), and the relevant extension to the interface is

Methods inherited from comtypes.gen.<guid>.ITest:
   Init(...)
      method Init

I'm not sure how to get the same thing in activeqt. ATL is using this code to define the interface (I think, this is in the automatically generated _i.h file):

MIDL_INTERFACE(<guid>)
ITest : public IDispatch
{
public:
    virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Init( 
        /* [in] */ IDispatch *obj) = 0;

};

and then the class definition inherits from

public IDispatchImpl<ITest>

I've tried mixing activeqt and ATL, but I've been unsuccessful so far. Should I be using dumpcpp instead? [edit] dumpcpp is useful if you want to call an 开发者_运维问答existing COM object from Qt, but doesn't help to extract the interface for use in activeQt.[/edit] Is that the way to override the interface without mixing ATL and activeqt? I'm wondering if the qt tools and ATL both trying to generate the idl is the source of my struggles...

Thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜