Skip to content
Discussion options

You must be logged in to vote

I think the TextStyle comes from within the style. Generally there's a chance that using multiple slint! macros within the same module may produces clashes. I think it's better to use separate modules to avoid this:

mod foo {
slint::slint!{ export component A { ... } }
}
mod bar {
slint::slint! { export component B { ... } }
}

fn main() {
    foo::A::new().unwrap().show().unwrap();
    bar::B::new().unwrap().show().unwrap();
    slint::run_event_loop().unwrap();
}

Replies: 6 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tronical
Comment options

Answer selected by tronical
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Kestrel96
Comment options

@ogoffart
Comment options

@Kestrel96
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants