slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.54k stars 600 forks source link

How to open file dialog to save or choose file #1296

Closed cppdev123 closed 2 years ago

cppdev123 commented 2 years ago

Is there a method in slint to open a file dialog ?

ogoffart commented 2 years ago

One way to do it is to use the rfd create https://lib.rs/crates/rfd For example that is what the cargo ui program does: https://github.com/slint-ui/cargo-ui/blob/3e2780dbffc9f123fc5205ffe242805d887f49ad/src/cargo.rs#L655

cppdev123 commented 2 years ago

thanks. also how to use the fluent style because the current look is very ugly !

ogoffart commented 2 years ago

with the SLINT_STYLE environment variable, or using slint_build::CompilerConfiguration::with_style and slint_build::compile_with_config

ogoffart commented 2 years ago

I am closing this issue because i believe the question has been answered.

If you have more question, just use the discussions: https://github.com/slint-ui/slint/discussions