Search code examples
qtactivexqtquick2qtwidgets

Qt - Embed an ActiveX Control


I am developing a new Qt application and I need to embed in it a third party ActiveX Control; I spent the last days learning about Qt Quick Controls 2.0, but I fear that ActiveX Controls can only be embedded in Qt Widgets applications. Is it right?

It will also be great if you can suggest any tutorial/example about my problem, since the official one seems a little bit too hard for a newbie like me.

Thank you very much!


Solution

  • Can we use Qt Quick (QML) altogether with ActiveX Qt embedded widget in one app?

    Short answer: yes.

    Details: we need to embed both Qt Quick and ActiveX in their own widget containers.

    P.S. QML is not preventing you from doing ActiveX in Qt but they are two separate type of UI and don't share same window. They can only be both embedded in other Qt widgets. I was developing such hybrid applications with Qt/QML/ActiveX and there is no complete guide to do so. Maybe a bit too many details plus you need to deal with specifics of ActiveX interfaces which is a separate topic.