Hi, Thanks for the information. On Thu, Jan 6, 2022 at 11:38 AM Ulf Hermann <ulf.herm...@qt.io> wrote:
> It's not implemented yet, and there are some questions surrounding the > desired syntax. > That's a given, no argument. > We already have group properties. So, if you have a property font of > some value type, you can already do this: > Yeah, but my beef with it is that I must derive from QObject for that, don't I? I can live with not having notifications for the fields, is what I mean. I just have a stupid struct with 2-3 fields, that I'd love to initialize within the document tree. I did some hacking around and did provide this out of the parser (just ignoring the warning about registering value types with capital letter), but I was wondering if I missed some subtle problem. The whole idea of just having the god factory I find distastefulness and somewhat harder to read/reason about. Currently this is what it looks like for me: property var person: Character { name: qsTr("Person name") age: Age { years: 1 months: 0 } Simulation.onAdvanced: { age.months++ } } I'd've 'accepted' initializing from a plain JSON object as well, but somehow I don't believe the QML parsing really works with these, plus the quoting of the field names is a pain.
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest