[gtk-web: 1/2] Update the Python example in language bindings




commit 569e6bcf39be5d0091318149f0af7bc5bed72723
Author: Arjan Molenaar <gaphor gmail com>
Date:   Sun Jul 25 20:42:47 2021 +0200

    Update the Python example in language bindings
    
    Fixes #75.

 _docs/language-bindings/python.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/_docs/language-bindings/python.md b/_docs/language-bindings/python.md
index a678ee9..21eb55d 100644
--- a/_docs/language-bindings/python.md
+++ b/_docs/language-bindings/python.md
@@ -31,15 +31,15 @@ started with the PyGObject.
 
 ```python
 import gi
-gi.require_version("Gtk", "3.0")
+gi.require_version("Gtk", "4.0")
 from gi.repository import Gtk
 
 def on_activate(app):
     win = Gtk.ApplicationWindow(application=app)
     btn = Gtk.Button(label="Hello, World!")
     btn.connect('clicked', lambda x: win.close())
-    win.add(btn)
-    win.show_all()
+    win.set_child(btn)
+    win.present()
 
 app = Gtk.Application(application_id='org.gtk.Example')
 app.connect('activate', on_activate)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]