Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 604
Vaibhav Kaushal Avatar asked Jan 22 '14 05:01

Vaibhav Kaushal


People also ask

Should I use Qt Quick or Qt widgets?

Qt Widgets provide means for customization via style sheets, but Qt Quick is a better performing choice for user interfaces that do not aim to look native. Qt Widgets do not scale well for animations. Qt Quick offers a convenient and natural way to implement animations in a declarative manner.

Which one you would prefer for GUI development Qt widget or Qt QML?

If you want to have a Qt app that looks like an native OS app then you must go with QtWidgets. QML allows you to write a much more custom UI. However, in my opinion, QML is simply awesome to write UI's.

What are Qt widgets?

Widgets are the primary elements for creating user interfaces in Qt. Widgets can display data and status information, receive user input, and provide a container for other widgets that should be grouped together. A widget that is not embedded in a parent widget is called a window.


1 Answers

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.

like image 158
Nicholas Smith Avatar answered Oct 23 '22 06:10

Nicholas Smith