Qt Quick vs. Qt Widget

Anthony picture Anthony · Dec 24, 2011 · Viewed 50.1k times · Source

I am new to Qt and don't quite understand the difference between a Qt Quick Project and a Qt Widget Project.

I am hoping to create a program that draws a lattice of hexagons that the user can rotate and shear, as well as pan around and zoom in and out of. It will eventually be a MIDI controller. Which type of project would be better for this, and why?

I am hoping for this to work on both desktop and mobile platforms.

Answer

AndrewS picture AndrewS · Jan 31, 2012

Note: Qt Widgets have been replaced with QML Widgets; this answer responds to the question as asked, which is now strictly a historical question about the old Qt Widgets.

Qt Quick is a declarative, smartphone-style user interface with support for a lot of the cool animation transitions that are common in smartphone apps. Quick is also a good choice for rapidly developing a prototype. Qt Widget is the traditional desktop-oriented UI model.

Right now (pre-Qt5), Qt Quick support for desktop system features is lacking (but improving). There's not as much support for menus, toolbars, dialogs, and other standard desktop behaviors in Quick, while Widget supports those elements extremely well.

Do you want your app to look and feel native on desktop and tablet platforms, or are you building a simple application around your own custom UI widget? As Mat said, if Qt Quick supports the features you want, that will probably be your fastest approach. If you want to build full-featured desktop versions, Qt Widget is probably your best bet.