When starting off with Qt Framework, what to choose - Widgets or QT Quick?

Vaibhav Kaushal picture Vaibhav Kaushal · Jan 22, 2014 · Viewed 13.3k times · Source

I have a project in mind and want to take on it and have chosen QT as the preferred framework to begin with. I have been trying to figure out how to start and have Qt package (SDK and Qt Creator) installed. The problem is - I am not able to figure out the exact use-cases of Qt Quick and Qt Widgets. I plan to make the project for a long-term purpose with these properties:

  • It will be a desktop-only GUI application. If I ever want to make a mobile version, I would do that for the mobile platform in native or HTML5, and not Qt. So code-base compatibility with any mobile platform is not my concern.
    • Touch UI and animations are also not a part of the feature set. However, down the line support for creating graphs would be great (I can always use QtWebkit and JS to create some though)
  • Windows is the prime target. Linux and Mac would probably not be used by the target user(s).
  • It would need to be self-upgradable - now that is not much of a concern in making the choice but if there are problems with either, some knowledge would help me. I do not mind a full application installer download but updating modules independently would be a little better
  • It would need to talk to a web server for fetching and uploading data (I think HTTP would be Qt core's job but I do not know much about Qt yet).
  • The app would need tables with inline editing, a small picture gallery, menus, multi-part windows, drag-n-drop support etc. I could not find anything about menus relating to Qt Quick though.

Considering that use-case, what would be a better choice - Qt Widgets or Qt Quick?

A little about me and why I chose Qt - I have been out of touch from C++ since almost 2 years and have not made anything serious in Qt but Qt is a preferable choice over Java (which I do not like much). Again, I lack experience with Python. In addition to that Python UI sucks and if I have to install QT framework for a good UI, why not make the entire thing in Qt anyway (considering I am okay with C++). So Qt is the preferable choice for me. Since the project would need to be cross-platform compatible, Qt is even more attractive to my eyes.

Answer

Nicholas Smith picture Nicholas Smith · Jan 22, 2014

QML will provide more support for customising widgets in a simple manner, Widgets gives you a set of tools ready to go that gives you platform styled controls in a very simple way. Both have their upsides, both have their downsides, I'd personally recommend getting started with Widgets first as there's a lot more historical documentation for them, so if you need to research something you'll have a bigger base to work with.

From your comment above, there's been little development on Widgets as the Qt development team feel that they don't need any additional work at this stage. They're stable, solid and reliable, there's not much that needs to be done to be improved, and when people need custom widgets they end up creating them themselves.