Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing an application that has various buttons such as addition, multiplication and so on.. now when I click on addition button I want a dialog box to be displayed that has labels n text inputs (design part). I am facing a problem with linking that dialog box to the button.. Please tell me step by step how to initialize it and what should be written under this :

def on_addition_clicked(self, widget):

share|improve this question
up vote 1 down vote accepted

In addition to defining the functions to be called, you must connect the signal of the button.
The easiest way to do this is to define a dict with a mapping from the names to the handlers and then pass it to the Gtk.Builder.connect_signals() method. Read here for more help.

share|improve this answer
Thank U that link was helpful for me... – user2511270 May 5 '14 at 16:20
@user2511270 You're welcome. If this answered your question you may mark this answer as accepted – girardengo May 5 '14 at 16:54
Yeah sry forgot that – user2511270 May 6 '14 at 5:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.