Replies: 2 comments
-
Never mind, solved it by running rfd in a separate thread: let path = std::sync::Arc::clone(&self.open_file);
std::thread::spawn(move || {
*path.lock().unwrap() = rfd::FileDialog::new()
.set_directory("/")
.pick_file()
.map(std::path::PathBuf::from);
}); |
Beta Was this translation helpful? Give feedback.
0 replies
-
Just linking this issue to this PR I made today in case anyone else ends up here after searching: #5697 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The file_dialog example in the egui repository uses rfd to display a file dialog. Unfortunately, it also hangs the app:
It seems the only way to avoid this is to use async Rust. Does anyone have an example of how this is done?
Beta Was this translation helpful? Give feedback.
All reactions