Description
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.
QML-rust alternatives and similar packages
Based on the "GUI" category.
Alternatively, view QML-rust alternatives based on common mentions on social networks and blogs.
-
slint
Slint is an open-source declarative GUI toolkit to build native user interfaces for Rust, C++, JavaScript, or Python apps. -
SixtyFPS
DISCONTINUED. Slint is a toolkit to efficiently develop fluid graphical user interfaces for any display: embedded devices and desktop applications. We support multiple programming languages, such as Rust, C++ or JavaScript. [Moved to: https://github.com/slint-ui/slint] -
Relm4
DISCONTINUED. An idiomatic GUI library inspired by Elm and based on gtk4-rs [Moved to: https://github.com/Relm4/Relm4] -
Kiss-ui
A simple UI framework for Rust built on top of IUP (http://webserver2.tecgraf.puc-rio.br/iup/)
SaaSHub - Software Alternatives and Reviews
Do you think we are missing an alternative of QML-rust or a related project?
Popular Comparisons
README
QML-rust - bindings for Qt Quick
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.
documentation
Examples
All examples are located in a folder [examples/](examples), under example_name.rs and example_name.qml names.
cargo run --example propertiesfor setting properties from Rust to QML.cargo run --example listmodelfor an example of providing QML with list model from Rust.cargo run --example listmodel_macrofor the same example, but usingQ_LISTMODEL!andQ_LISTMODEL_ITEM!macro.cargo run --example sigslotsfor an example of how to create your ownQObjectwith signals and slots, and to communicate between QML and Rust. Also shows how to useQ_OBJECT!macro.cargo run --example qobjectsfor an example of how to useQ_OBJECT!macro with different types.cargo run --example qvarlistsfor an example of how to useqvarlist!macro to easily formQVariant(used to pass data to QML) of a complex array.cargo run --example threadedfor an example of multithreading.cargo run --example qmlregisterfor an example of how to register and use your own types from Rust in QML.- An example in
examples/resources(should be run manually bycargo run) shows how to use qrc resources.
Requires CMake, Make, Qt (Core, Gui, Widgets, Quick), pkg-config (only for OS X and GNU/Linux) and, of course, Rust.
To run tests: RUST_TEST_THREADS=1 cargo test
In-app examples
- Architect - an app showing some git stats, using qml-rust to provide properties and lists to QML in here.
- Kefia - A simple package manager, that provides a QListModel to QML, registers a QObject with slots and communicates between QML and Rust, here.
Status
Done:
- Basic initialization and execution.
- Providing properties to QML files.
- QAbstractListModels - provides changable models for QML items (early draft, still lacks proper mutability).
- QObjects: slots, signals (limited properties support). Emitting signals and receiving slots works.
- Registering your own QML types (singletons or not) from Rust code.
To be done:
- the library is mostly done, but some stuff is lacking polish, like possible memory leaks or better macro designs.