filedragdrop.rs 351 B

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