pygtk-glade

import pygtk
pygtk.require("2.0")
import gtk
class startlogin(object):
    def close_app(self):
        gtk.main_quit()
    def exit_app(self):
        gtk.Widget.destroy(self.window)
    def on_startshow_destroy(self, widget,data=None):
        self.close_app()
    def on_exitbutton_clicked(self, widget,data=None):
        self.exit_app()        
    def __init__(self):
        builder = gtk.Builder()
        builder.add_from_file("gladexml\startshow.glade")
        builder.connect_signals(self)
        self.window = builder.get_object("startshow")     
if __name__ == "__main__":
    startlogin = startlogin()
    startlogin.window.show()
    gtk.main()

 


pygtk-glade

 


 

 

你可能感兴趣的:(gtk)