[Interest] Upgrade to Qt 5 -- pros and cons?

Till Oliver Knoll till.oliver.knoll at gmail.com
Fri Mar 22 09:40:12 CET 2013


2013/3/22 Pritam Ghanghas <Pritam_Ghanghas at infosys.com>:
> Hi
>
> I would also like to know the status of Qt5 with regard to cross flatform desktop application.
> In particular I keep seeing posts on the mailing list that talk about animations and openGL Drivers.

You probably refer to QtQuick2 and the "new paradigm" of designing
user interfaces with QML (http://en.wikipedia.org/wiki/QML). Yes, the
underlying paint engine was indeed completely re-written (compared to
Qt 4.x) and makes heavy use of OpenGL ES 2.0 enabled hardware.

With "well-behaving" drivers that should not be a problem. But to get
maximum compatibility (with graphic cards which otherwise do not have
"stable OpenGL drivers") you can still build Qt 5 on Windows with an
underlying Direct3D via a support library called "angle"
(http://code.google.com/p/angleproject/ - I think...). In fact IIRC
that is the standard of the pre-compiled stock Qt binaries for
download.

All that said, if I understood correctly that all only affects the
QtQuick 2 part of Qt. The "traditional" way of designing desktop
applications - namely with good ol' widgets, QPainter and Co. - is not
affected. It is still drawn using the underlying OS 2D paint API
(however Qt draws most of its GUI on its own into pixmaps, and those
are then passed down to the underlying OS paint API - or so I
understand roughly).

I am sure I got some details wrong above (maybe QWidgets do now also
depend on a working OpenGL/Angle implementation under the hood in  Qt
5?),  but someone will for sure correct me ;)

> Here is my main concern, can we do native looking cross platform applications with Qt5 that do not suffer from strange combinations of Graphics hardware.  And what is the preferred way of doing such native looking applications in Qt5, qml components, Qtwidgets?

My *personal* preference for *desktop* applications (and that's really
the only thing I do so far ;)) is clearly QWidgets! I find the
parent-child paradigm very intuitive and I *love* the C++ API that Qt
offers me to control everything. They look "out of the box" as native
as possible. And I don't need a "paper GUI approach where I can
scribble all the way over in whatever colour that pleases me". And I
detest *custom* animated windows and other UI elements ;)

That has somewhat become "acceptable" even on Mac OS X (which
otherwise has traditionally had very strict design guidelines in the
past) with those sad "skeuomorphic apps" (oh, how I /love/ that word
'skeuomorphic' - look it up: http://en.wikipedia.org/wiki/Skeuomorph
:)) - but we all heard the outcry in the OS X community, and Scott
Forstall is now gone
(http://venturebeat.com/2012/10/30/skeuomorphic-design-or-one-reason-we-can-be-thankful-scott-forstall-is-gone/).

That said, there is off course also an attempt to provide *desktop
friendly* elements to QML. But in my opinion that is like re-inventing
the wheel, because one will end up what we already have - QWidgets -
except you need to deal with editing XML like QML files (*yikes* -
I'll never understand why someone would prefer to edit GUIs in that
way ;)) and even JavaScript ("Run away! Run away!" -
http://25.media.tumblr.com/tumblr_m7n9y4VJhc1rvvt9fo1_500.jpg). Or you
say "You don't have to edit QML by hand" hand you use the Qt Designer
- and again you end up with exactly what we have today: Qt Creator and
*.ui files (but you'd probably still need to deal with JavaScript in
one way or another: "Run away! Run away!" ;))

However: if you *really* want to do "custom GUIs" - for embedded
systems or whatnot - then QML is probably just the right tool for you!

Cheers, Oliver



More information about the Interest mailing list