I am trying to develop an app for android/ios/windows for which I want UI to be in html/css.
I tried using webkit, but I assume we can't use it anymore as it is deprecated and will be removed in future releases (moreover webkit was nit working on android mobile). So I used QTWebengine. Now my problem is when I try to communicate from my html to js it is fine, but from js to c++ is not working. Everywhere I am getting examples using webkit, but not with webengine. Can someone please help ?
Also is it possible to create an app using html/css (and background in c++ communicating via js) to run fine on desktop and mobiles ??
Clem last edited by
my problem is when I try to communicate from my html to js it is fine, but from js to c++ is not working. Everywhere I am getting examples using webkit, but not with webengine. Can someone please help ?
From what I understood, you can have a look at QWebChannel standalone example given with Qt 5.5. It gets more complicated than with QtWebKit, and I was wondering if I were missing something or if it were supposed to change eventually, but I got no reply.
Thanks a lot..
Yes the code is very complicated, and it seems that we are sending some data in json format from our C++ app to server and that is being displayed on browser. While I am looking for some example in which app's UI will be in html and all backend operations (like write/read database) will be in C++. These html will be rendered using QTWebengine, as QWebkit is deprecated.
maximus last edited by maximus
Now you have to include QWebChannel.js, and do a bunch of other steps. I wish all theses steps could be automated and done under the hood by Qt using some flag on the QWebEngineView for example.
That and also QWebEngine is harder to deploy compared to QWebKit, the QWebEngineView is not present in designer..etc. all that makes me stick for QWebKit for now...
I am able to use Qwebchannel in a single windows application, where windows loads my local html pages and via QwebChannel i send some data to my c++ code
janalleman last edited by
Can you send data from c++ object back to html/js? If so, do you have suggestion on what should be done different in my question here ... with that code I an unable to get variables in html/js.