Files
dioxus/examples/filedragdrop.rs
T
2024-01-16 12:28:21 -06:00

18 lines
350 B
Rust

use dioxus::prelude::*;
use dioxus_desktop::Config;
fn main() {
LaunchBuilder::new(app)
.cfg(Config::new().with_file_drop_handler(|_w, e| {
println!("{e:?}");
true
}))
.launch_desktop()
}
fn app() -> Element {
render!(
div { h1 { "drag a file here and check your console" } }
)
}