I wonder if it would be possible to totally declare the QtQuick scene from C++ 
without any Qml files actually, with Qt6 you got C++ binding and the Qml is 
compiled to C++ anyway. Maybe I miss something but it could be possible to 
actually only write C++ to create the actual scene?!

I would not actually do this myself but it might attract some user that are 
scare of declarative, I love Qml and the declarative binding make it super easy 
to glue the model to the GUI and the GUI is not seen into the C++ and my model 
are stay clean. I find the Qml way to split the layer of the application pretty 
clean if you understand what you have to do (keep the model and the business 
logic into C++, Qml is only for the GUI and display). The model exposes 
property and signal/slot, that it’s doesn’t care where it come from or what is 
going to modify it. That really force you to have a split between GUI layer and 
the business logic layer. I stop using QWidgets a few years ago and I don’t 
miss it a bit, haven’t seen anything I could not achieved into Qml yet, some 
are a bit trickier than they should but in the end prototyping and modifying 
the GUI is so quick, I often make the change live when I’m working with my 
graphic designer and KDAB GammaRay (just need to apply those change after).


From: Interest <interest-boun...@qt-project.org> on behalf of Bernhard Lindner 
<priv...@bernhard-lindner.de>
Date: Thursday, April 22, 2021 at 7:01 AM
To: interest@qt-project.org <interest@qt-project.org>
Subject: Re: [Interest] Guide me through the Qt offerings for GUIs

> Widgets are heavy, often very complex objects. They often come with all bells 
> and
> whistles. QPushButton always has the data structure to support 
> QPushButton::setMenu,
> even if probably <1% of buttons out there ever use that feature. That’s ok on 
> desktop
> machines, it’s not ok on embedded systems.

Hm, this kind of confirms my impression: Quick is lightweight, simplified and 
suited for
embedded and touch. While widgets are more powerful and suited for complex 
desktops
applications. This makes me wonder even more why Qt gave up widgets. The logical
explanation is, Qt kind of gave up desktop.

You explained why the widgets concept is not compatible with the Quick concept. 
Can you
also explain why it was not possible to implement Quick as an additional, 
mostly widget-
independent C++ layer and then wrap it declaratively?

--
Best Regards,
Bernhard Lindner

_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to