Replies: 1 comment
-
All slint generated stuff will endup in the same module. Maybe if you want to have different module, you can manualy re-export them from different modules. Example: mod generated {
slint::include_modules!{}
}
mod mod1 {
pub use super::generated::{Foo};
}
mod mod2 {
pub use super::generated::{Bar};
} |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all! I'm new in Slint, after a whole day of testing of how to organise projects.. I could not find to do it!
Actually, use
slint::include_modules
just imports all from all places.Due to issues we can mainly only use one time
slint! {export {Foo} from "file.slint"}
which implies we can't create modules calling several macro statements to organise the API.So, even with small project I can't found how to organise to skip "have one unique name for each type globally".
For example we do not have generics in Slint, which means we need different Result types for each different type of call that can fails and need to show errors in different ways.
Having several .slint files, how do you organise them to avoid all the elements be in the same namespace?
I'm using Slint 1.12.1 and Rust.
Thx!
Beta Was this translation helpful? Give feedback.
All reactions