Qt Widgets or QML or both ?
-
I started learning Qt from books about 1.5 years ago and these books mention Qt Widgets, so that's what I started learning.
About 8 months ago I asked help from freelancer and he guided me to use QML/Quick2 and to get away from Widgets. He told me that QT/QML was the future and I should be building my application for more than desktop applictions, branching out to large mobile devices such as iPads.
In my original plan to use Widgets, I was using this Ribbon Control http://www.devmachines.com/qtitanribbon-overview.htm
The Ribbon Control I was using was based on Widgets and the freelancer said I should not pay $400 a year for a subscription and told me that he could rewrite the Ribbon Control in QML instead and never need to pay for a subscription. So Far I have spent about $4,000+ with this freelancer and the quality of the product is very ugly, and not reusable in any sense.
My Program relies on QtWebEngine and come to find out that I can't static compile for QtWebEngine. So my ideas for larger mobile devices are shot down. I understand to get something into Apple Store I must static compile.
So I am back to the drawing board targeting Desktop Applications such as Linux, Mac and Windows and forgetting about mobile devices.
My Application does a lot of heavy lifting and I need to pull every ounce of speed from the CPU that I can.
I am now doubting my freelancer expert and thinking widgets are not so bad after all.
What I am afraid of happening is that I spend 2 years getting my application stable with all the features I want then need to switch to something else.
It's almost 2018, is it safe to base my application on Qt Widgets only?
-
@EatonCode said in Qt Widgets or QML or both ?:
It's almost 2018, is it safe to base my application on Qt Widgets only?
Yes. Widgets are not deprecated, there are still bug fixes being applied to them, and they are still a great choice for desktop only apps. And they also do work on mobile OSes, although they are somewhat lacking in looks department.
-
Regarding a QML / Widgets choice - it is entirely possible to keep your business logic separated from UI code so that you can have both Widgets UI and QML UI.
-
Hi
Recreating QtitanRibbon in QML would be huge task and most likely only work good
if made as a QML Extension in c++.Also if you keep a clean separation between what is showing data and what
is altering data, there is nothing dangerous using Widgets as you can later
use QML for interface and still reuse all data handling classes.
(as @sierdzio suggests) This is actually good design
albeit the introduction of javascript and QML syntax makes the development+maintenance
more complex.Your Designer is right about QML is the future but if your product do not need
tons of swiping and gesture based interaction, or openGl rendering then
Widgets will fit just fine.Also, many major players are using Widgets for their products so they are here to stay for decades still.
-
Hi
I think for the Qt 3D module both QML and widgets/c++ are targets so
i think they will get equal attentions. Its not ment to be QML only.The QML sample tends to be less verbose than same c++ setup so i think
its the main reason for more QML samples - currently.