Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Should I prefer QML over plain C++?
b2soft last edited by
Hello. I need to redesign my desktop software (like new Reload version) and I'm a bit confused. New GUIs provided by UI/UX designer need animations and opacity/position animations.
First version of my program uses only QT Designer created forms with QSS for style handling. So, please give me advise, should I prefer QML for animations/transitions/UI, or hardcode it in some way in QT Designer/Sources?
What are pros and cons using both methods (QML vs C++) to handle animations?
Sunfluxgames last edited by
QML are very efficient when it comes to update a scene frame after frame to produce a smooth animation. QML has a issue where it must resolve dynamic types or create data-structures to represent property bindings and go through the Qt meta object type system to access any native member.
Almost all of which C++ performs equivalently at compile time. As long as you create QML's that can be accomplished with asynchronous Loaders or by pre-loading components it shouldn't matter.
b2soft last edited by
Is it complicated to rework project from simple C++ + QT Designer designed forms to QML-based GUI? Should I need to use other IDEs/Editors to work with QML?
Sorry for idiot question, but is QML a QT's implementation of MVC idiom?
Charlie_Hdz last edited by
@b2soft QML is a declarative language which is easier to do animations than Qt Widgets class related with pictures and animations.
QML has a strong relation with Qt Core classes... but I'm not sure about any relation to MVC... I'll bet there is none.
A Former User last edited by
Is it complicated to rework project from simple C++ + QT Designer designed forms to QML-based GUI?
QMLyou can't use
Qt Widgetsbut you'll use
QtQuick Controlsinstead. They are quite feature complete but not as full-blown complete as
Qt Widgets. If you have a simple GUI already then it will be easy to port it to QML. If you have custom Widgets then you'll have to reimplement them in QML first.
b2soft last edited by b2soft
@Wieland I use only simple labels/etc stuff stylized using QSS. There are no custom widgets at all.
Thanks for answers!