Replies: 1 comment 3 replies
-
Async is curious as Qt / QML isn't expecting things to be async, so what I tend to do so far is use async in a background thread or block_on a result from an invokable. If you #[tokio::main]
async fn main() {
let mut app = QGuiApplication::new();
let mut engine = QQmlApplicationEngine::new();
... This then allows you to use There is also a |
Beta Was this translation helpful? Give feedback.
-
Hello!
I've been interested in Qt+Rust as a way to develop good cross-platform applications for a while, because Qt is a very complete and mature framework, with QML as a great UI language, and of course Rust is a great language with lots of interesting features and a very active community.
Async/await is becoming ever more prevalent, with many new API wrappers and the likes being published exclusively as async crates. One particular example I'm interested on, is the great matrix-rust-sdk, which is now powering clients such as Element X iOS (Rust+SwiftUI), Element X Android (Rust+Jetpack Compose) and Fractal (Rust+GTK4). I'd like to play around with making a client with Rust+Qt :)
I've seen some other efforts like qmetaobject-rs (and an experimental async compatibility crate, qmeta-async, from the SailfishOS folks), and I wanted to know how CXX-Qt does it (if at all).
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions