3 ms·
Actually, QML has included Desktop Widgets for QML since Qt 5.1 under the name Qt Quick Controls[1], which means that desktop-type applications are now supporte
by Derbasti 13y ago
Actually, QML has included Desktop Widgets for QML since Qt 5.1 under the name Qt Quick Controls[1], which means that desktop-type applications are now supported for QML as well.
Having used those a bit, I have to conclude that they are FREAKING AWESOME. Sorry for yelling. If you are used to developing Qt applications using C++ and the Widgets only, please do check that out. It is amazing!
[1]: http://qt-project.org/wiki/New-Features-in-Qt-5.1 http://qt-project.org/wiki/New-Features-in-Qt-5.1
- general_failure 13y agoQML is awesome, no doubt about it (and I am big fanboi myself). But that doesn't take away the fact that Qt Widget -> QML is basically a complete rewrite of your app.
- sho_hn 13y agoDepends. QML sits on top of technologies and API fashions that Qt debuted before QML came along, such as the QAbstractItemModel API contract and the QObject property sytem, as well as QMetaObject in general. Porting an app to Qt Quick Controls is significant work (and currently will get you lossy results as mentioned above), but there's a lot you can do to prepare while using QWidget, or quite possibly already did because it was compelling and useful to architect apps that way before already - so you can likely plain reuse a lot of your code. And the fact remains, there's no pressing need to port to Controls anyway.
- CountSessine 13y agoNo - not at all. We're doing this right now and we've structured the change by using QDeclarativeView/QtQuickView within our existing QWidget architecture. Depending on how you want to structure your application, using QML can be as easy as converting a widget/dialog/form at a time and allowing the C++ code to drive the QML, or going for a full re-write with the core of the program in QML with C++ helpers bound to it. QWidget isn't going anywhere. If "Qt Widget -> QML" is an unpleasant "complete rewrite of your app" then don't do it. Stick with QWidget.
- sho_hn 13y agoRighto, I was off-by-one on that, thanks :). We're currently transitioning to Qt 5.2 which involved upstreaming lots of things we need in there, so it's become a mental habit to think of anything shiny we're using as being new in 5.2. So far we consider Controls to be very promising, but there's plenty of gaps (no form layouts, incomplete QStyle support, some pathological performance problems, lacking automatic keyboard accelerator management, plain missing standard widgets, etc.) that don't quite make it stand up in comparison if you're serious about desktop use (which we are), so I think it best not to overpromise. We're making quite an investment into the technology anyhow, though; it'll get there with time (and effort).