How can I set a specific Slint component in Rust, and could you provide an example? Thank you very much. #6732
Answered
by
laycookie
daydaystudylab
asked this question in
Q&A
-
How can I set a specific Slint component in Rust, and could you provide an example? Thank you very much🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
laycookie
Nov 7, 2024
Replies: 1 comment 6 replies
-
The same way you would define a slint component in the fn main() {
let ui = Test::new().unwrap();
ui.run().unwrap();
}
slint::slint!(
import { VerticalBox, LineEdit } from "std-widgets.slint";
export component Test inherits Window {
VerticalBox {
max-width: 768px;
Text {
text: "test";
}
LineEdit {
height: 50px;
placeholder-text: "Token";
}
}
}
); |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@daydaystudylab What do you mean by "set up LineEdit"?