Is there an GUI Designer for python?

Glade Install glade

If you want a wysiwyg GUI designer, Glade is your best bet:

  • first, install glade from the software centre
  • create your GUI, save it as, say, myapp.glade

    enter image description here

  • Go to the signals tab and set up your callback, such as on_window1_destroy

  • In your python program, tell GTK to load the UI definitions

    import gtk
    
    
    class MyApp (object):
    
        def __init__(self):
            self.builder = gtk.Builder()
            self.builder.add_from_file("myapp.glade")
            self.builder.connect_signals(self)
    
        def run(self):
            self.builder.get_object("window1").show_all()
            gtk.main()
    
        def on_window1_destroy(self, *args):
            gtk.main_quit()
    
    
    MyApp().run()
    

After getting everything set up, you can dive straight into the Glade tutorial (as Jeremy Kerr mentioned in his answer). Start by learning about the different lay–out options and signals.


Quickly Install quickly

When you feel comfortable with glade, you can start using it via Quickly, which is a set of programs to make the common tasks in developing software very easy. It takes care of translations, storing configuration, packaging, launchpad integration including PPAs, and lots more:

sudo apt-get install quickly
quickly create ubuntu-application hello-world
cd hello-world/

Quickly now creates a huge project with everything you need already set up. A gui, the translation files, configuration via desktopcouch, and so on.

You'll see quickly sets up a few windows (the main App, configuration, and an about dialogue) for you. To start editing your GUI:

  • run quickly design

    enter image description here

  • To get to the app's code, run quickly edit

  • Go to the HelloWorldWindow.py file

  • Now start adding signal handlers and logic.

Finally, to run your application, type quickly run.

At this point, you can get into the PyGTK documentation in order to learn about the signals, their handlers' signatures, the different widgets' methods and so on.

  • PyGTK 2.0 Reference Manual
  • PyGObject Reference Manual
  • Quickly Widgets (not required)

See also, some related questions:

  • What IDE to use for Python?

  • Best Visual-Studio Like tool for Linux Development

  • Creating GUI with Python in Linux

  • What is a good text editor for developing code on?


Qt-Designer

  • Qt5 is also available.
  • qt4-designer Install qt4-designer
  • qt3-designer Install qt3-designer

PyQt comes with Qt's Designer, which is a pretty neat graphical GUI editor, if you fancy to write your app with the Qt framework.

Qt Designer screenshot

Qt Creator

Qt's new IDE has full blown support both for desiging widgets (as designer above) and QtQuick applicaitons, which is better for lightweight, fluid, touch-enabled applications (i.e. tablet/mobile apps)