dioxus/examples/filedragdrop.rs

18 lines
350 B
Rust
Raw Normal View History

2022-01-10 17:57:39 +00:00
use dioxus::prelude::*;
use dioxus_desktop::Config;
2022-01-10 17:57:39 +00:00
fn main() {
LaunchBuilder::new(app)
.cfg(Config::new().with_file_drop_handler(|_w, e| {
2024-01-15 21:06:05 +00:00
println!("{e:?}");
true
}))
.launch_desktop()
2022-01-10 17:57:39 +00:00
}
fn app() -> Element {
2024-01-16 18:28:21 +00:00
render!(
div { h1 { "drag a file here and check your console" } }
2024-01-14 05:12:21 +00:00
)
2022-01-10 17:57:39 +00:00
}