Classic Qt widgets or Qt Quick?
-
Hi,
I'm not sure if my question belongs to this forum or I should post it to Qt Quick forum.
I decided to post it here, because I think it's more general question about desktop development.I need to test some C++ libraries for manipulating images and geometries.
So, I'd like to prototype a simple desktop application for this purpose.
I have some experience with Qt, so I've decided to use Qt framework.
Lately, I found there is Qt Quick engine and one of its overviews suggests
it should be a good choice for prototyping UI and applications.My question is, which option would you suggest: classic C++ Qt widgets in or Qt Quick?
If I choose Qt Quick, I'll need to pass some rasters/vectors from C++ to Quick,
so the latter can render it. Is it possible?If I decide to use Qt Quick, which version of Qt SDK is best to install?
I'm prototyping and I'm not scared of using alpha or beta versions.
On Linux, I use most recent versions of GCC.
On windows, I use Visual Studio 2010 (and 11 Developer Preview),
I do not use MinGW or any form of GCC on Windows.In case of Qt Quick applications, I understand there is no problem with
compiling C++ bits with Visual C++ on Windows. Am I right? -
Welcome to Developer Network - this forums is just fine for your questions.
For the more easy to answer questions:
Doing the C++ part of a hybrid application with Visual Studio is fine. QML + C++ works with all the supported C++ compilers.You can choose the SDK, which delivers Qt Creator (an IDE), the libs and some additional tools, or you can install all components separately. I usually go with the latter, as I have better control of which versions I use. On the windows side you need the stand alone Qt libs anyways, as the SDK only contains binaries for MinGW.
For the versioning on Windows: The latest release of Qt (4.7.4) does not provide prebuilt binaries for VS 2010, you will have to grab the sources (download "here":http://qt.nokia.com/downloads/downloads#qt-lib) and compile yourself. The 4.8 Release Candidate has a VS 2010 version, get that from "here":http://developer.qt.nokia.com/prereleases.
Now for the not so easy part:
I'm not that deep into QML/Qt Quick development. From my current experience and combined with what I've heard from fellow developers and from talking to others at DevDays, I would for this moment say, that QML is fine for mobile development, but it's not really prime time for desktop applications. QML components for the desktop are in heavy development (I missed the talk on DevDays) and look promising. I expect that to get some more momentum together with Qt5, which will be released next year. Right now, it's too much of a moving target.So, I personally, would go with a pure C++ application at the moment. Using a QML mockup to present to decision-makers is an option, though.
Please be aware, that this is a pure personal opinion. Others might come to other conclusions for very good reasons. So wait for some additional answers before making your own decision :-)
-
-
[quote author="broadpeak" date="1323097543"]There was an article in this site, that in Qt5 the QML/Quick will be the main modul for desktop(!) and mobile too. The QWidget will be a simple modul like QtNetwork. Acoording to this article, in the future prefer QML/Quick to QWidget.[/quote]
Indeed, but I'm curious about how they plan to keep people going using only QML, when Qt looks like the "fastest" way to go.
-
"Indeed, but I’m curious about how they plan to keep people going using only QML, when Qt looks like the “fastest” way to go."
Because Qt will be fully modularized, it won't be problem which of the module want to use somebody in the future. And you can mixin the modules, you can use QML in (almost :) ) purely C++ code. QML and Qwidget can be interchangeable.
But the main line will be the QML, as the article claimed. -
[quote author="veeeee_d" date="1323099243"]
[quote author="broadpeak" date="1323097543"]There was an article in this site, that in Qt5 the QML/Quick will be the main modul for desktop(!) and mobile too. The QWidget will be a simple modul like QtNetwork. Acoording to this article, in the future prefer QML/Quick to QWidget.[/quote]Indeed, but I'm curious about how they plan to keep people going using only QML, when Qt looks like the "fastest" way to go.[/quote]
True, it seems that that is the way development is heading. However, while the goal is Qt5, it is certainly not going to be 5.0, and most probably not even 5.1 where such a shift will start to be stimulated and is expected to gain momentum. The Quick Components for Desktop are really impressive as a demonstration where we're heading, but it is IMHO by no means a compete solution yet. The project is still very much in flux.About the modularization: QtWidgets will indeed be a module in Qt 5. The module will depend on the the QtGui module, which depends on QtCore. QtQuick also will be a module that depends on QtGui, if I understood it correctly. So yes, Qt Widgets will be "just" another module. That module will not even be supported anymore for mobile platforms. For mobile platforms, the old-fashioned widgets never really were a good idea. However, for the desktop, the widgets are very much a supported technology, and will be for the forseeable future.