Hello everybody. I am trying to learn how to create GUI for my python programs using Glade. Now I'm facing the following problem : I have written something like the code below, and when I run it everything works fine except secondWindow doesn't show up. What am I doing wrong? Do I have to change any properties through Glade?
Here's my code :
class MyProg() :
def on_button_clicked(self, widget, data=None) :
def do_something(x, y) :
# Code
return True
self.mainWindow.hide()
self.secondWindow.show()
isdone = do_something(x, y)
if isdone :
self.secondWindow.hide()
self.thirdWindow.show()
def __init__(self) :
builder = gtk.Builder()
builder.add_from_file("blahblah.glade")
self.mainWindow = builder.get_object("mainwindow")
self.secondWindow = builder.get_object("secondwindow")
self.thirdWindow = builder.get_object("thirdwindow")
builder.connect_signals(self)
if __name__ == '__main__' :
myprog = MyProg()
myprog.mainWindow.show()
gtk.main()
Thank you in advance.