cyndis / qmlrs

QtQuick interface for Rust
Apache License 2.0
437 stars 43 forks source link

Passing non-primitive types to template #54

Open kieraneglin opened 7 years ago

kieraneglin commented 7 years ago

Disclaimer: completely new to Rust and QML.

I want to be able to return a Vec<CustomType> and be able to iterate over the vector from within my QML template. For instance, I fetch a vector of User's from a DB. How can I pass this vector to my QML template?

I've tried passing an array of primitives without luck. What's the idiomatic way to handle this?

Thank you!

ShalokShalom commented 7 years ago

qmlrs is without a single commit since over a year, try this one here as an alternative: https://github.com/White-Oak/qml-rust

ShalokShalom commented 7 years ago

There is even a further developed version of this one here: https://github.com/flanfly/qmlrs

And here is a binding for some other crates: https://github.com/rust-qt/cpp_to_rust

marmistrz commented 7 years ago

@ShalokShalom if you suggest people using alternatives, why not officialy deprecate/orphan the package at crates.io?

flanfly commented 7 years ago

I'm not maintaining my qmlrs fork anymore. At Panopticon we ultimately settled on writing our own Qt wrapper. Before going down that route you may want to take a look at qml-rust.