Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Develop C++ Qt application GUI interfaces in HTML+javascript?

We are working on a Qt application, that we eventually want to move the the web up to some extent. For smoother transition we consider developing the user interfaces using QtWebKit in HTML/javascript. Later we want to reuse these UI pieces in the web application, when we are there.

Does it sound like a meaningful idea? How much more complicated will it be to develop the user interfaces in HTML/Javascript vs QtGui? Is it a common practice, or no?Are there any pitfalls that we should be aware of?

like image 543
ak. Avatar asked Dec 02 '10 22:12

ak.


2 Answers

This is apparently a common practice, but I very strongly reccomend against it. A desktop application is not a web browser. Design your logic how you want, and build your Qt interface so that it's decoupled from your log. When you want to build a web version, rebuild the UI from scratch to be a browser based client.

like image 109
Falmarri Avatar answered Sep 28 '22 19:09

Falmarri


The QtWebKit Bridge describes how you can combine a WebKit-based UI with business logic in C++. There also was a talk about this at the Qt DevDays; videos about the talks should appear here Real Soon Now.

like image 28
hmuelner Avatar answered Sep 28 '22 18:09

hmuelner