OK, I lied, I do have another question...

Anthony Papillion papillion at gmail.com
Mon Jul 11 08:42:30 CEST 2011

Hi Everyone,

So I've used Glade to build a simple UI and I'm loading it with
gtkBuilder. The UI loads fine but, for some reason, none of my signals
are being connected. For example, in Glade, I said when the button
called btnExit was clicked, execute the btnExit_clicked method. Then, in
my App() class definition, I defined btnExit_clicked(self, widget) and
simply added the gtk.main_quit() statement (to exit). But when I start
my app, I am told that the btnExit_clicked() method isn't defined. This
happens for every single signal I define.

I'm assuming I'm simply putting something in the wrong place so can
anyone have a look at this and tell me what that might be? It looks
almost identical to examples I've seen on the net.  Thanks!


class App:
    def __init__(self):
        builder = gtk.Builder()
        builder.connect_signals({"on_window_destroy" : gtk.main_quit,
"on_btnExit_clicked" : btnExit_clicked})
        self.window = builder.get_object("winMain")

    def btnSaveInformation_clicked(self, widget):

    def btnExit_clicked(self, widget):

if __name__ == "__main__":
	myApp = App()


More information about the Python-list mailing list