How to port Qt qml to web server with C++ backend

apache, c++, qml, qt, web

Solution

QmlWeb is a JavaScript library that is able to parse QML-code and create a website out of it using normal HTML/DOM elements and absolute positions within CSS, translating the QML properties into CSS properties.

QmlWeb is a small project started primarily by Lauri Paimen who developed it for a few years and is now a KDE project maintained by Anton Kreuzkamp.

QmlWeb of course doesn’t yet support everything Qt’s implementation of QML does, but it already supports a quite usable subset of it. It supports nearly all of the most basic QML syntax. Moreover it has support for HTML input elements (Button, TextInput, TextArea are currently supported, more to come).

Well, QmlWeb is not finished. I hope Digia help with this project to make it ready with mature features.

Problem

Is it possible to write front-end of my application in QML and back-end in C++ and compile it somehow so that I can deploy it to a web-server like Apache or JBoss so that it is accessible from within a web browser ? If yes, do you have any examples how to perform this ? Thank you very much for your answers :) I was trying to find an answer to my question on the Internet but I was not successful.

Original source