We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd2b1d2 commit 55faa6fCopy full SHA for 55faa6f
book/src/g_object_memory_management.md
@@ -37,22 +37,17 @@ fn build_ui(application: &Application) {
37
// When a button is clicked, `number` should be changed
38
button_increase.connect_clicked(|_| number += 1);
39
40
- // Add buttons to `gtk_box`
41
- let gtk_box = gtk::Box::builder()
42
- .orientation(Orientation::Vertical)
43
- .build();
44
- gtk_box.append(&button_increase);
45
-
46
// Create a window
47
let window = ApplicationWindow::builder()
48
.application(application)
49
.title("My GTK App")
50
- .child(>k_box)
+ .child(&button_increase)
51
.build();
52
53
// Present the window
54
window.present();
55
}
+
56
```
57
58
Here we would like to create a simple app with two buttons.
0 commit comments