diff --git a/src/main.rs b/src/main.rs index aac12f7..ddb63b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,5 +17,19 @@ fn build_ui(app: &Application) { .title("Hello, World!") .build(); + let button = Button::builder() + .label("Press me!") + .margin_top(12) + .margin_bottom(12) + .margin_start(12) + .margin_end(12) + .build(); + + button.connect_clicked(move |button| { + button.set_label("Hello, World!"); + }); + + window.set_child(Some(&button)); + window.present(); }