8

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?

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Any reason against this except principles?
Well, it entirely depends on the context. If you're already writing a C++ Qt ap, you should use the native GUI. It would be significantly faster. If you use HTML+javascript for the interface, you then need to roll your own interface to your back end. If you're truly building a web application, then C++/Qt is probably not the best way to go.
3

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.