filedragdrop.rs 333 B

12345678910111213141516171819
  1. use dioxus::prelude::*;
  2. use dioxus_desktop::Config;
  3. fn main() {
  4. Config::new()
  5. .with_file_drop_handler(|_w, e| {
  6. println!("{e:?}");
  7. true
  8. })
  9. .launch(app)
  10. }
  11. fn app() -> Element {
  12. rsx!(
  13. div {
  14. h1 { "drag a file here and check your console" }
  15. }
  16. )
  17. }