I have an application implemented in Qt with some c++ and python integrated modules (machine learning, signal processing, etc.) with the following basic characteristics:
QThread
)QwtPlotZoomer
, QwtPlotMarker
, QGraphicsRectItem
, QwtPlotCurve
.My goal is to provide the already implemented application characteristics of the server running application via a web browser application with multiple users-observers. I have made some research and spotted some possible solutions (Qt WebGL, Qt for Assembly, Wt) on the following links (link, link, link, and link) but as an unexperienced web application developer I am not entirely sure which of these or alternative and preferable C++
modules to use.
Can you please provide some suggestions and guidance on witch web development library to use based on characteristics like the maturity, capabilities, easy of use, and the maturity (flexibility with Qt widgets) but also take into account the characteristics of my application?
Thank you in advance.
PS: I would like to mention if that helps that I am experienced in C++ and python not Java and Javascript.
If you want to make an application that can server multiple clients with Qt, there are 3 general options:
This one will create a pure server-sided implementation and simply display the GUI remotely in the browser. This appears to be the simplest approach, but has a few limitations and drawbacks:
All together this method was never designed for such a use case. It is meant to be used as GUI for headless devices or maintanance access. I would not recommend to use it.
Split your application in two: A server application and a client application. The client application with Qt for WebAssembly. Communication between the two can be done with QtWebSockets
, QtRemoteObjects
or other Network-IPC solutions.
This gives you the advantage of having to use only one language, and makes IPC very easy, as both sides use Qt. Also, calcuation-heavy tasks are much more efficient in WASM. However Qt for WebAssembly is still in a technical preview state and thus not stable yet. For example it does not support multithreading or TCP/IP sockets yet. Also, not all enddevices support WASM as of now.
The last approach is to mix technologies. Use a Web-Framework like Cutelyst to create a Qt-based webserver and serve a classical HTML website with it. You can use QtWebChannel to transfer data between your Qt-Server and the HTML-Client easily.
The decision between a WASM and a HTML client is up to you. Using WASM might be easier for you, but has it's own challanges. I would recommend you do some more reseach on both. Then create a few test applications for both solutions and compare them, to figure out which one fits your needs best