MyTetra Share
Делитесь знаниями!
simple example
Время создания: 01.05.2017 00:48
Раздел: Python - PyGTK
Запись: xintrea/mytetra_db_mcold/master/base/149358892672v6yygo43/text.html на
# coding: utf-8
import gi
'Gtk', '3.0')
from gi.repository import Gtk

class MyWindow(Gtk.Window):

def __init__(self):
__init__(self, title="Hello World")

self.button = Gtk.Button(label="Click Here")
self.button.connect("clicked", self.on_button_clicked)

def on_button_clicked(self, widget):
print("Hello World")

win = MyWindow()
"delete-event", Gtk.main_quit) # connecting to the window’s delete event to ensure that the application is terminated if we click on the x to close the window.
win.show_all() # display the window
Gtk.main() # start the GTK+ processing loop which we quit when the window is closed
MyTetra Share v.0.58
Яндекс индекс цитирования