Search code examples
qtuser-interfaceqtwebkit

Can I port a C++ project to QT and then use QTWebKit to create a HTML5 front end?


please bear in mind I am not a GUI programmer.

As the title says but to give a little more details:

I have a very large C++ application which I would like to upgrade the GUI for. There is an SDK that we can attach a new GUI onto and I would like to make it look as modern and fancy as possible, I have been advised to use HTML5 for this.

We build and link the project using in house bat files which I have hooked into MSDEV to save me going back to the console every time I want to build the project. I also use MSDEV to attach to the programs when they are running to debug.

Can I also do this in QT?

(I cannot download it and try as I need to have a business case for downloading new software and investigation is a hard one to get approved).

If I did this in QT, could I then use Webkit to create a HTML 5 front end or is there more work required?


Solution

  • What Does Qt Look Like

    http://www.youtube.com/watch?v=bVQ0S-b5lDs

    The demo program that comes with the Qt SDK shows off quite a bit of what you can do with the GUI programming. You can build almost anything you can imagine!

    It looks native to the operating system it is running on, Windows 7, Mac OSX, Ubuntu, etc.

    I believe most of the Linux KDE GUI is now done through Qt.

    Running Console Applications

    If you need to run things from the console, you can manage that in C++ pretty easily.

    system("run_this.bat");
    

    In Qt, if you don't need to see the console window, you can run most things as a QProcess.

    There are ways to hook the stderr and see what is going on as well.

    HTML 5

    Something written in HTML 5 shows up in a browser, and there are a number of slick graphics and effects that can be used with it, but using the QtWebKit, will only ensure that the webpage you are rendering looks the same on every computer you run it on. Most modern browsers are becoming HTML 5 compliant, so relying on the HTML 5 out of Qt shouldn't be necessary.

    W3Schools gives a pretty good introduction into what HTML 5 adds to websites:

    http://www.w3schools.com/html/html5_intro.asp

    Using HTML 5 or C++

    Writing a web application that uses HTML 5 versus writing a Desktop application that uses a native GUI are two very different things.

    Running files on a local machine is pretty sandboxed when going through a browser with HTML 5. If you are okay with running something remotely on your own server, then it shouldn't be too bad.