简体   繁体   中英

Can I use an existing native Windows COM interface in a Qt app

I'm having to use an SDK modeled on Microsoft's COM. I'm developing for Windows in C++.

I found this article that implies one can "use COM in Qt", but it is not clear whether they mean to register my own, new COM interface or whether they mean I can use an existing one that wasn't created in Qt (they speak of "creating a COM server").

The question is whether this is possible in Qt and whether this is somewhat of a hack or standard practice. If it is possible, would it make a difference if Qt is using the MinGW or VS compiler?

You can read in the Qt documentation about Active Qt module :

Qt's ActiveX and COM support allows Qt for Windows developers to:

  • Access and use ActiveX controls and COM objects provided by any ActiveX server in their Qt applications.

  • Make their Qt applications available as COM servers, with any number of Qt objects and widgets as COM objects and ActiveX controls.

So the answer is that you can easily use existing com objects and activex controls created with any language in your Qt application with the API provided by the Active Qt module. You can either use VS compiler or MinGW.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM