gladebaseapp/test.py

33 lines
718 B
Python

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
class App:
def on_btnUpdate_clicked(self, btn):
self.label.set_text("Aggiornato!")
def on_btnQuit_clicked(self, btn):
Gtk.main_quit()
def gtk_main_quit(self, btn):
Gtk.main_quit()
def __init__(self):
self.builder = Gtk.Builder()
self.builder.add_from_file('test.glade')
self.builder.connect_signals(self)
self.window = self.builder.get_object("windowMain")
self.window.show()
self.label = self.builder.get_object("lblText")
Gtk.main()
def __destroy__(self):
Gtk.main_quit()
if __name__ == '__main__':
a = App()