5

I currently have a Qt-based GUI application that simply provides a graphical dashboard (guages, graphs, and such) displaying real-time data provided by another application via a TCP connection. For architectural and security reasons, I have been told that my TCP connection is no longer allowed, and that an HTTPS websocket will be my only conduit. It was suggested that I convert my app to a webapp using HTML5 and Javascript. However, I'm not a web programmer, but may consider this an opportunity to learn a new technology. I want to understand the landscape a little better before making a decision. So, I think my choices are:

  1. Convert my app to a web app, giving me all the advantages/disadvantages of web-based apps. More work for me, as it's a new technology and I already have the Qt/TCP version working fine. If this is the suggested approach, any suggestions on a development environment/tools would be appreciated.

  2. Convert my current Qt app to us a client HTTPS connection rather than a TCP connection. Not sure this is possible. From what I've read, this may not be possible with QtWebKit. Seems strange?

Maybe there's another choice I'm not considering?

Bryan Greenway
  • 703
  • 11
  • 30

4 Answers4

3

You can also use a mixed approach, using WT library. It's c++ (and QT inspired) based. It has a nice toolkit and supports websockets.

http://www.webtoolkit.eu/wt/examples/

kikeenrique
  • 2,589
  • 2
  • 25
  • 46
  • Wt is based on Boost, not on Qt. Taking into account Wt is in C++, it will allow to re-use non-GUI logic, when porting. But GUI have to be done from the scratch. And it has no LGPL licence. – divanov Oct 25 '12 at 10:22
1

Porting requires a lot of work. On Qt side there are at least two implementations of WebSockets:

  1. QtWebSocket, Qt-based websocket server implementation and alpha-state implementation of websocket client.
  2. WebSocket++, Boost-based websocket server and client implementation.
divanov
  • 6,173
  • 3
  • 32
  • 51
0

I just went through a similar exercise for work recently. We settled on the Google Web Toolkit (GWT) framework for doing our web apps. It's completely java-based, meaning you write (almost) everything in Java and the GWT compiler converts it to Javascript for you. We used the GWT-EventService plugin for pushing data from the server to the clients.

I wish I had know about this WT library before we started though, that looks interesting.

timwoj
  • 388
  • 4
  • 14
  • Porting from Qt to GWT probably isn't any easier than porting from Qt to plain web application. – divanov Oct 25 '12 at 10:14
0

You can also have a look at QWebSockets, which is a pure Qt implementation of websockets, both for client and server use.

Update: this library is now an integral part of Qt

Kurt Pattyn
  • 2,758
  • 2
  • 30
  • 42