[Interest] [Qt6] Gadgets in QML

Ulf Hermann ulf.hermann at qt.io
Thu Jan 6 11:54:11 CET 2022


> 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++
}


More information about the Interest mailing list