Crates.io | qml |
lib.rs | qml |
version | 0.0.9 |
source | src |
created_at | 2016-06-30 03:56:40.333712 |
updated_at | 2016-12-11 22:32:31.225679 |
description | Safe QML bindings for Rust |
homepage | |
repository | https://github.com/White-Oak/qml-rust |
max_upload_size | |
id | 5537 |
size | 87,428 |
Bindings are based on DOtherSide C bindings for QML Library is mostly feature-compliant with other bindings based on the library, but lacks some minor features and has quite a few bugs.
All examples are located in a folder examples/
, under example_name.rs
and example_name.qml
names.
cargo run --example properties
for setting properties from Rust to QML.cargo run --example listmodel
for an example of providing QML with list model from Rust.cargo run --example listmodel_macro
for the same example, but using Q_LISTMODEL!
and Q_LISTMODEL_ITEM!
macro.cargo run --example sigslots
for an example of how to create your own QObject
with signals and slots, and to communicate between QML and Rust. Also shows how to use Q_OBJECT!
macro.cargo run --example qobjects
for an example of how to use Q_OBJECT!
macro with different types.cargo run --example qvarlists
for an example of how to use qvarlist!
macro to easily form QVariant
(used to pass data to QML) of a complex array.cargo run --example threaded
for an example of multithreading.cargo run --example qmlregister
for an example of how to register and use your own types from Rust in QML.examples/resources
(should be run manually by cargo run
) shows how to use qrc resources.Requires CMake, Make, Qt (Core, Gui, Widgets, Quick) and, of course, Rust.
To run tests: RUST_TEST_THREADS=1 cargo test
Done:
To be done: