Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (20 sloc) 770 Bytes
from gi.repository import Gtk
class MyWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Hello World") = Gtk.Box(spacing=6)
self.button1 = Gtk.Button(label="Hello")
self.button1.connect("clicked", self.on_button1_clicked), True, True, 0)
self.button2 = Gtk.Button(label="Goodbye")
self.button2.connect("clicked", self.on_button2_clicked), True, True, 0)
def on_button1_clicked(self, widget):
print "Hello"
def on_button2_clicked(self, widget):
print "Goodbye"
win = MyWindow()
win.connect("delete-event", Gtk.main_quit)
Jump to Line
Something went wrong with that request. Please try again.