[Interest] [Qt6] Gadgets in QML
Konstantin Shegunov
kshegunov at gmail.com
Thu Jan 6 15:01:10 CET 2022
On Thu, Jan 6, 2022 at 12:54 PM Ulf Hermann <ulf.hermann at qt.io> wrote:
> > Person is a `QObject`, the `Age` is a gadget I've exposed from C++.
>
> Then it's easy. If the "age" property is declared in C++, already today
> you can do the following (just like with font):
>
> property var person: Person {
> age {
> years: 12
> months: 4
> }
>
> Simulation.onAdvanced: age.months++
> }
>
Yes, I'd intended to also provide:
property var age: Age {}
However, I just saw that my whole reasoning is moot, as gadgets appear to
be wrapped in a QObject anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220106/7288ea6f/attachment.htm>
More information about the Interest
mailing list