Did you use gpt4? I asked it to give me some examples code for a dialog box with an input field and a button and it gave me this:
use slint::slint;
slint! { DialogBox := Window { width: 400px; height: 200px; title: "Input Dialog";
VerticalBox {
padding: 20px;
spacing: 10px;
TextInput {
id: input_field;
placeholder_text: "Enter text here";
}
Button {
text: "Submit";
clicked => {
// Handle the button click event
println!("Input: {}", input_field.text());
}
}
}
}
}fn main() { DialogBox::new().run(); }