https://bugs.kde.org/show_bug.cgi?id=397107
Bug ID: 397107 Summary: PATCH WIP: Add moveable objects Product: rust-qt-binding-generator Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: wishlist Priority: NOR Component: general Assignee: j...@vandenoever.info Reporter: kdebuac....@porcupinefactory.org Target Milestone: --- Created attachment 114276 --> https://bugs.kde.org/attachment.cgi?id=114276&action=edit The WIP patch Hello, I want to have a bit more freedom dealing with QML objects, especially moving them around, so here's an implementation allowing objects to be nested from the perspective of QML (and also moved around). The JSON declaration recycles "write" for the purpose of indicating that the object can be replaced. It implicitly means that the object is optional - when an object is declared in QML as a property, it will call always "set" of the parent object. Optionality here allows us not to care about the initial "empty" value. As such, they are treated differently than any other kind of a property. One drawback I'd like to solve is the Clone trait on any inner object. In my project, it only contained one reference to a C structure, so it was not important to me. If the Rust structure needs to carry actual data, this will probably have to be reworked with some Arcs. The best test case for this is QML: SomeObject { myObject: MyType {} } However, I don't know how to test that within the existing framework. This feature is already in use in my very incomplete email reader: https://github.com/rhn/notquick/ I hope we can swiftly beat this idea into shape, and then I can propose the more ambitious support for creating objects on the fly ;) -- You are receiving this mail because: You are watching all bug changes.