3 ms·
By writeable references, I meant replacing one QML reference by another: RustFoo {id: "foo"} RustBar { foo_field: foo } This is possible wit
by rhn_mk1 8y ago
By writeable references, I meant replacing one QML reference by another:
RustFoo {id: "foo"}
RustBar {
foo_field: foo
}
This is possible with my branch. Your above example needs to be amended the following way:
"child": {
"type": "Child",
+ "write": "true"
}
The API changes quite a bit unfortunately, and is no longer so nice to use.
Unfortunately, my ideas to use (read-only) objects in itemProperties all end up complicating the API even worse, with abundant Box<>es and wrappers over wrappers. I can't find an elegant way to work around the mismatch between some Rust and C++ concepts (mostly lifetimes), but I expect to come up with something worth discussing within a couple of weeks.
- oever 8y ago> The API changes quite a bit unfortunately, and is no longer so nice to use. The object property could be changed to use QSharedPointer<X> when it is writable instead of a raw pointer (const X*). The setter could be done completely in C++ initially, since the main use case, as you show, is to assign that value in QML or Qt code. > objects in itemProperties [..] I expect to come up with something worth discussing within a couple of weeks Looking forward to it! For any Qt, QML or Rust experts reading this: I'd love your keen eyes on the generated code from Rust Qt Binding Generator.