Qt - Embed an ActiveX Control - qt

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!

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.
Build a widget-based Windows Qt application from the start. Example.
Embed QML UI into widgets with QWidget::createWindowContainer() which is one of ways to do so.
Embed or create an independent QAxWidget to hold ActiveX control in it.
The best way to deal with third-party ActiveX is to import its type-library like Qutlook Example (ActiveQt).
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.

Related

Qt as unity's UI

I saw that genshin impact (made with unity) has qt/qml folder so I suppose the whole game's UI is made with the QT core.
I tried to look up how to add qt to unity but I didn't find anything relevant (apart from the unity scene widget from the qt core but I don't think that's it).
So has anyone got an idea how they achieved it (if they actually did) ?
Thanks in advance.
As far as i'm aware, it's not possible to create UI using Qt core with Unity. So the qt/qml folder you saw was probably for something else and doesn't mean they used Qt.

Approaches to provide a Qt Gui via Web?

Sometimes I stumble upon frameworks that used to provide a web interface for Qt applications (like e.g. https://github.com/alberthier/qtwui)
Is there today a Qt5 way (or even better PyQt5) to run a Qt application on a server while accessing the UI via web?
I know several conceptions, but from my point of view they are not ready for production.
Emscripten: http://blog.qt.io/blog/2015/09/25/qt-for-native-client-and-emscripten
QML Web: https://github.com/qmlweb/qmlweb
WebGL streaming is one way forward, as it allows to run both QML and widget-based UIs in the browser.

How to adjust sound of QWebView based Qt Application

I have created a Qt GUI application which has QWebView object to open a URL which has embedded flash content. My problem is that I would like to control the audio volume of my Qt Application(QWebView), but I am not able to find any way to do so.
However I came across classes from the Phonon module like AudioOutput and VolumeSlider but had no luck.
There is one example on the Qt website but that itself uses Media Player, for which we can control the volume.
Please advise on how can we get rid of this problem.
It looks like this is a limitation of QWebView based application as of now.
The problem is that Flash manages it's own volume and you cannot access it from Qt.

Guidance required for code generation tool

I am interested to write a GUI based tool which would generate code in return. Something similar to VB GUI interface or Xcode's Interface Builder. I am going to use QT tookkit which is cross platform.
Can you help me to point out some resources which could be helpful to make such tools?
Thanks
Qt creator comes with an integrated UI Designer. The designer can be used stand alone or integrated into Visual Studio as well.

Using Qt QWebPage in a Windows QtService

I am using QtService to write a web page thumbnail rendering service. Is it possible to include sufficient of the Gui libraries to keep QtWebKit happy without running into the restriction on interactive services?
I have the websnap sample from websnap.cpp and this somehow convinces the QWebPage component that a Gui is available without actually displaying the widget. When I try to duplicate the environment in the service it complains that there in no gui for the widget.
I strongly suspect that QtService and QWebPage are fundamentally incompatible but have not yet given up hope that there is a workaround.
I am not even sure what it is that the websnap sample does that keeps QWebPage happy (is it just because its linked with the Gui library?)
I am very new to the Qt library so the answer may be obvious to someone with more experience.
Thanks,
Andy
Althought QtWebKit can work in headless environment (without any visible widgets), it still requires graphics libraries etc to be present and functional. Otherwise, how would it compute font metrics, render the text, and so on? Thus, you always need QtGui.
PS: I wrote the websnap example :)

Resources