Is there a graphical GUI builder?

Discussion in 'Python' started by Rex Macey, Feb 19, 2013.

  1. Rex Macey

    Rex Macey Guest

    I'm new to Python and only a hobbyist programmer. A long time ago I used Microsoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.
    Rex Macey, Feb 19, 2013
    #1
    1. Advertising

  2. On 19/02/2013 22:19, Rex Macey wrote:
    > I'm new to Python and only a hobbyist programmer. A long time ago I used Microsoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.
    >


    Try typing "python gui builder" into your favourite search engine. If
    you're lucky you might find something, if not you'll have to write your
    own or do without.

    --
    Cheers.

    Mark Lawrence
    Mark Lawrence, Feb 19, 2013
    #2
    1. Advertising

  3. Rex Macey

    Ian Kelly Guest

    On Tue, Feb 19, 2013 at 3:19 PM, Rex Macey <> wrote:
    > I'm new to Python and only a hobbyist programmer. A long time ago I usedMicrosoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.


    wxFormBuilder seems to be popular and works with wxPython. Beyond
    that, you might also take a look at the "GUI Design Tools and IDEs"
    list at:

    http://wiki.python.org/moin/GuiProgramming
    Ian Kelly, Feb 19, 2013
    #3
  4. On Wed, Feb 20, 2013 at 9:19 AM, Rex Macey <> wrote:
    > I'm new to Python and only a hobbyist programmer. A long time ago I usedMicrosoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.


    That way of building a window tends to produce programs that port
    badly to other systems. Back in the 1990s, I used to build windows
    that way (mainly using VX-REXX); playing with Java applets introduced
    the novel and somewhat strange idea that your window should be built
    using rules and layouts, to avoid problems with button sizes, fonts,
    etc, etc. Today, cross-platform code is the norm, not a curiosity, so
    this method of building up a window is correspondingly more plausible.
    I strongly recommend it.

    You have to think about your window differently - think about what
    you're putting where, rather than going visually "that looks about
    right" - but the reward is that it'll look right no matter where you
    run your app. As an added bonus, you don't need any sort of graphical
    builder; you can just write code directly in your editor.

    ChrisA
    Chris Angelico, Feb 19, 2013
    #4
  5. Rex Macey

    Phil Guest

    On 20/02/13 08:19, Rex Macey wrote:
    > I'm new to Python and only a hobbyist programmer. A long time ago I used Microsoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.
    >


    I'm new to Python myself and the best IDE that I've found is Eric.

    --
    Regards,
    Phil
    Phil, Feb 19, 2013
    #5
  6. Rex Macey

    Miki Tebeka Guest

    > I'm wondering if there's a utility for Python to build GUIs.
    IIRC the Qt builder can generate Python code.
    Miki Tebeka, Feb 19, 2013
    #6
  7. Rex Macey

    duncan smith Guest

    On 19/02/13 22:19, Rex Macey wrote:
    > I'm new to Python and only a hobbyist programmer. A long time ago I used Microsoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.
    >


    Boa Constructor perhaps (http://boa-constructor.sourceforge.net/).

    Duncan
    duncan smith, Feb 20, 2013
    #7
  8. Hi,

    > I'm new to Python and only a hobbyist programmer. A long time ago I used Microsoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs.

    yes, there are several, depending on the GUI-toolkit (GTK+, Qt, ...)
    you want to use.

    But I would recommend Glade and the GTK+-Toolkit. Simply search
    for Glade, GTK and Python in your favourite search engine, and you
    will find several tutorials.

    regards,
    Roland
    Roland Koebler, Feb 20, 2013
    #8
  9. On 02/19/2013 07:53 PM, Roland Koebler wrote:
    > Hi,
    >
    >> I'm new to Python and only a hobbyist programmer. A long time ago
    >> I used Microsoft's Visual Basic which had a nice (graphical)
    >> facility for creating GUIs which was part of the development
    >> environment. I'm wondering if there's a utility for Python to
    >> build GUIs.

    > yes, there are several, depending on the GUI-toolkit (GTK+, Qt, ...)
    > you want to use.
    >
    > But I would recommend Glade and the GTK+-Toolkit. Simply search for
    > Glade, GTK and Python in your favourite search engine, and you will
    > find several tutorials.


    I agree that on Linux GTK is pretty darn slick. I use it for all my
    little GUIs. But on Windows, GTK, particularly under python, isn't
    quite as easy to get running. Just be forewarned. Doesn't seem to me
    that GTK on windows is being developed at the same pace as it is on Linux.

    I think if the OP is on windows (which it seems like he is) then Qt with
    PySide (using either QML or QtDesigner to manipulate ui files) is an
    excellent choice.
    Michael Torrie, Feb 20, 2013
    #9
  10. On 19/02/2013 23:19, Rex Macey wrote:
    > I'm new to Python and only a hobbyist programmer. A long time ago I used Microsoft's Visual Basic which had a nice (graphical) facility for creating GUIs which was part of the development environment. I'm wondering if there's a utility for Python to build GUIs. I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs. Thanks.

    Take a look at Qt (and PyQt) - this includes QtDesigner, a nice GUI
    design/generation tool. Three caveats:

    1. Read and Re-read the response from Chris Angelico - IME he knows what
    he is talking about and I'm just in the process of learning first hand
    what he is telling you (I'm writing an application in Python with PyQt).
    2. Qt isn't 'free' (depending on what you are going to be doing with it)
    - read the licensing rules.
    3. QtDesigner isn't Visual Studio and creating a GUI in Qt/PyQt tends to
    be a process of GUI design, GUI code generation and integration with
    your 'business logic.' There's no round-trip-engineering, so if you
    mess with your GUI code after generating it, it isn't easy to get it
    back into QtDesigner.

    Steve Simmons
    Steve Simmons, Feb 20, 2013
    #10
  11. Hi,

    > That way of building a window tends to produce programs that port
    > badly to other systems.

    hmm, I don't think so. I've build several applications in C + GTK/Glade and
    Python + GTK/Glade, which easily run on Linux and Windows without any GUI
    changes.

    > playing with Java applets introduced
    > the novel and somewhat strange idea that your window should be built
    > using rules and layouts, to avoid problems with button sizes, fonts,
    > etc, etc.

    Do you know the container-concept of GTK+ and Glade?

    In many GUI-builders, you set your widgets to fixed positions (e.g. a text
    field at x16/y16 with 100*30 pixels, a button at x16/y50 with 100*50 pixels
    etc.). This is *bad*, and causes all kinds of problems with e.g. different
    window- or font-sizes, like widgets outside of the visible window, text
    running over the border of a widget or being cut at the edge of the widget
    etc.

    But: GTK+ has a wonderful concept of "containers" [*]. You normally don't
    set widgets to fixed positions -- instead, you add layout tables (or
    vertical boxes or horizontal boxes or ...), and essentially define
    that some widgets should be above each other, side by side or in a grid
    layout, so you more or less define the layout logically. The real size
    and position of the widgets is dynamically calculated by GTK+, so they
    always have the right size, and different font sizes, different window
    sizes, etc. are not a problem anymore [q]. And Glade (the GTK+ GUI builder)
    works exactly that way.


    [*] Besides, the container-concept also allows such nice things like
    putting anything inside a button (e.g. 2 images and a label), or inside
    a notebook tab etc. pp.

    [q] In Qt, it's also possible to generate such flexible layouts. But
    it's unfortunately not the default way in Qt, and the Qt designer only
    supports it rudimentarily, and in a much less obvious way. And Qt does
    not have such a "container"-concept, where many widgets (e.g. buttons,
    notebook registers etc.) contain other widgets.

    > You have to think about your window differently - think about what
    > you're putting where, rather than going visually "that looks about
    > right" - but the reward is that it'll look right no matter where you
    > run your app.

    Yes, that's also true for GTK+/Glade.
    But you have the choice to either build you GUI graphically with your
    mouse, or textually in your editor -- or mix both.


    regards
    Roland
    Roland Koebler, Feb 20, 2013
    #11
  12. On Wed, 20 Feb 2013 10:34:50 +0100, Roland Koebler <>

    ....

    > [q] In Qt, it's also possible to generate such flexible layouts. But
    > it's unfortunately not the default way in Qt, and the Qt designer only
    > supports it rudimentarily, and in a much less obvious way. And Qt does
    > not have such a "container"-concept, where many widgets (e.g. buttons,
    > notebook registers etc.) contain other widgets.


    ....

    I'm sorry but all of that is completely wrong. Using layouts that
    automatically adapt to fonts, the size of widgets being laid out etc. is
    the default way. You could use explicit sizes and positions if you wanted
    to, but that would be bad for the reasons you gave. Qt does have a
    container concept - that's what a QWidget is (the base class of all
    widgets).

    Phil
    Phil Thompson, Feb 20, 2013
    #12
  13. On Wed, Feb 20, 2013 at 8:34 PM, Roland Koebler <> wrote:
    > Hi,
    >
    >> That way of building a window tends to produce programs that port
    >> badly to other systems.

    > hmm, I don't think so. I've build several applications in C + GTK/Glade and
    > Python + GTK/Glade, which easily run on Linux and Windows without any GUI
    > changes.
    >
    >> playing with Java applets introduced
    >> the novel and somewhat strange idea that your window should be built
    >> using rules and layouts, to avoid problems with button sizes, fonts,
    >> etc, etc.

    > Do you know the container-concept of GTK+ and Glade?


    Yes, I do; it's just that I first met that concept when I started
    playing with Java applets. Up until then, all my UIs had been either
    textual or laid out with pixel-based positioning in a WYSIWYG layout
    editor.

    > In many GUI-builders, you set your widgets to fixed positions (e.g. a text
    > field at x16/y16 with 100*30 pixels, a button at x16/y50 with 100*50 pixels
    > etc.). This is *bad*, and causes all kinds of problems with e.g. different
    > window- or font-sizes, like widgets outside of the visible window, text
    > running over the border of a widget or being cut at the edge of the widget
    > etc.
    >
    > But: GTK+ has a wonderful concept of "containers" [*]. You normally don't
    > set widgets to fixed positions -- instead, you add layout tables (or
    > vertical boxes or horizontal boxes or ...), and essentially define
    > that some widgets should be above each other, side by side or in a grid
    > layout, so you more or less define the layout logically. The real size
    > and position of the widgets is dynamically calculated by GTK+, so they
    > always have the right size, and different font sizes, different window
    > sizes, etc. are not a problem anymore [q]. And Glade (the GTK+ GUI builder)
    > works exactly that way.


    Precisely. That's the fundamental difference of thinking. I haven't
    actually used Glade, preferring to lay things out myself in actual
    code, but the difference isn't so much between "visual layout editor"
    and "code to create stuff" as it is between "pixel-positioning" and
    "rule-based layout". And it's that difference that creates the
    distinction between programs that look terrible on anything other than
    the programmer's own system, and those that look fine on any platform.

    Same thing happens with web browsers, too, except that they're a lot
    more likely to be flat-out buggy (I do not EVER want to go back to
    making a web page look correct in IE6).

    > [*] Besides, the container-concept also allows such nice things like
    > putting anything inside a button (e.g. 2 images and a label), or inside
    > a notebook tab etc. pp.


    Not that you'll actually *use* that flexibility very often, but it
    sure is nice when you want it! And it's a cleanliness of design, too;
    instead of having the PushButton subclassed to be the ImagePushButton,
    and having the Notebook have special code to permit you to put an icon
    on the tab, no, you just have the button surface and the tab accept
    one child, which can be a layout manager. What if you like how the
    image+text button looks, but want the image to take 25% of any spare
    space and the text to grab the other 75%? I've no idea if that level
    of flexibility will EVER be wanted, but you can do it with an Hbox
    layout manager, so you can do it on a button.

    It's a huge change of thinking, if you've grown up laying things out
    on pixels. But it's SO worthwhile.

    ChrisA
    Chris Angelico, Feb 20, 2013
    #13
  14. Hi,

    > I agree that on Linux GTK is pretty darn slick. I use it for all my
    > little GUIs. But on Windows, GTK, particularly under python, isn't
    > quite as easy to get running.

    installing GTK+ 2.x should be easy, since there are all-in-one-installers
    for windows on http://www.gtk.org (for GTK+) and http://www.pygtk.org
    (for Python+GTK+).

    Installing GTK+ 3.x on windows is currently a bit more complicated, but this
    situation should improve soon.

    > I think if the OP is on windows (which it seems like he is) then Qt with
    > PySide (using either QML or QtDesigner to manipulate ui files) is an
    > excellent choice.

    I never was happy with QtDesigner -- I always struggled *a lot*
    (in contrast to Glade, where most things worked like a charm).

    I not even achieved to rename the tab of a notebook (?!) or to create
    a button with an icon above the text, or a grid layout without a fixed
    layout. It even seems that the QtDesigner doesn't even provide standard-
    icons (e.g. for open, close, exit etc.) or a file dialog. Am I doing
    something fundamentally wrong in QtDesigner, or is QtDesigner really
    that bad?

    regards
    Roland
    Roland Koebler, Feb 20, 2013
    #14
  15. Hi,

    > > [q] In Qt, it's also possible to generate such flexible layouts. But
    > > it's unfortunately not the default way in Qt, and the Qt designer only
    > > supports it rudimentarily, and in a much less obvious way. And Qt does
    > > not have such a "container"-concept, where many widgets (e.g. buttons,
    > > notebook registers etc.) contain other widgets.

    >
    > ...
    >
    > I'm sorry but all of that is completely wrong. Using layouts that
    > automatically adapt to fonts, the size of widgets being laid out etc. is
    > the default way. You could use explicit sizes and positions if you wanted
    > to, but that would be bad for the reasons you gave.

    hmm, interesting, but then Qt Designer is a total mess.

    In Qt Designer (at least in 4.x), the default is a fixed layout, where
    I have to position the widgets at precise pixel-positions and have to
    define the size in pixels. And I cannot remove the default fixed layout
    without modifying the .ui-file in a text editor!

    > Qt does have a
    > container concept - that's what a QWidget is (the base class of all
    > widgets).

    A container concept like in GTK+ is *much* more than having a base
    widget where all widgets are derived from, or having layout boxes.
    It means that most widgets are containers, like buttons, notebook
    labels, checkboxes, radio buttons, scrollbar-windows etc.
    And I haven't seen anything like this in Qt (or: in Qt Designer).


    regards
    Roland
    Roland Koebler, Feb 20, 2013
    #15
  16. On Wed, 20 Feb 2013 11:42:48 +0100, Roland Koebler <>
    wrote:
    > Hi,
    >
    >> > [q] In Qt, it's also possible to generate such flexible layouts. But
    >> > it's unfortunately not the default way in Qt, and the Qt designer

    only
    >> > supports it rudimentarily, and in a much less obvious way. And Qt

    does
    >> > not have such a "container"-concept, where many widgets (e.g.

    buttons,
    >> > notebook registers etc.) contain other widgets.

    >>
    >> ...
    >>
    >> I'm sorry but all of that is completely wrong. Using layouts that
    >> automatically adapt to fonts, the size of widgets being laid out etc.

    is
    >> the default way. You could use explicit sizes and positions if you

    wanted
    >> to, but that would be bad for the reasons you gave.

    > hmm, interesting, but then Qt Designer is a total mess.
    >
    > In Qt Designer (at least in 4.x), the default is a fixed layout, where
    > I have to position the widgets at precise pixel-positions and have to
    > define the size in pixels. And I cannot remove the default fixed layout
    > without modifying the .ui-file in a text editor!


    I'm sorry but that is just wrong. You position the widgets roughly, select
    them, then click on the button corresponding to the layout you want to
    apply. By selecting a sub-set of the widgets you can create a sub-layout
    which itself can be part of a parent layout. You therefore create any sort
    of layout you want without specifying a single pixel position or size.

    Phil
    Phil Thompson, Feb 20, 2013
    #16
  17. Hi Phil,

    > > In Qt Designer (at least in 4.x), the default is a fixed layout, where
    > > I have to position the widgets at precise pixel-positions and have to
    > > define the size in pixels. And I cannot remove the default fixed layout
    > > without modifying the .ui-file in a text editor!

    >
    > I'm sorry but that is just wrong.

    I now found out, that I can indeed change the default fixed layout by
    clicking onto the empty main window or by selecting the main window in
    the Object Inspector and then clicking on a layout-icon on the toolbar.
    Thanks.

    I hope that most developers who use Qt use this feature, since the fixed
    layout is the default in Qt designer and it's not really obvious how to
    change this for beginners...


    regards
    Roland
    Roland Koebler, Feb 20, 2013
    #17
  18. Rex Macey

    Laszlo Nagy Guest


    > You have to think about your window differently - think about what
    > you're putting where, rather than going visually "that looks about
    > right" - but the reward is that it'll look right no matter where you
    > run your app. As an added bonus, you don't need any sort of graphical
    > builder; you can just write code directly in your editor.

    Yes, but these are not mutually exclusive. There can be (and there are)
    GUI tools that let you arrange your widgets with layouts and rules. In
    other words, using layouts and rules does not alone make it impossible
    to use a GUI builder.
    Laszlo Nagy, Feb 20, 2013
    #18
  19. On Wed, Feb 20, 2013 at 11:09 PM, Laszlo Nagy <> wrote:
    >
    >> You have to think about your window differently - think about what
    >> you're putting where, rather than going visually "that looks about
    >> right" - but the reward is that it'll look right no matter where you
    >> run your app. As an added bonus, you don't need any sort of graphical
    >> builder; you can just write code directly in your editor.

    >
    > Yes, but these are not mutually exclusive. There can be (and there are) GUI
    > tools that let you arrange your widgets with layouts and rules. In other
    > words, using layouts and rules does not alone make it impossible to use a
    > GUI builder.


    Agreed, as I clarified in my subsequent post. My original statement
    was a tad broad. The GUI builder isn't the problem, but the Visual
    BASIC GUI builder is pixel-based, and is therefore part of what I
    described as tending to produce non-portable UIs.

    ChrisA
    Chris Angelico, Feb 20, 2013
    #19
  20. Rex Macey

    Kevin Walzer Guest

    On 2/19/13 5:19 PM, Rex Macey wrote:
    > I see that there is TKinter, which is a scripting function to build GUIs. To be clear, I'm looking for a graphical interface to build GUIs.


    Tkinter is so easy to use to build GUI's that a GUI tool isn't needed.
    Hardly any Tk or Tkinter developer uses anything but a text editor and
    console to develop a user interface.

    --
    Kevin Walzer
    Code by Kevin/Mobile Code by Kevin
    http://www.codebykevin.com
    http://www.wtmobilesoftware.com
    Kevin Walzer, Feb 20, 2013
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nik
    Replies:
    3
    Views:
    308
    Stef Mientki
    Jul 14, 2007
  2. azrael
    Replies:
    20
    Views:
    746
    Mike Driscoll
    Nov 10, 2008
  3. Chris Angelico
    Replies:
    1
    Views:
    196
    Wolfgang Keller
    Jun 14, 2012
  4. Dietmar Schwertberger
    Replies:
    5
    Views:
    295
  5. Dietmar Schwertberger
    Replies:
    5
    Views:
    331
Loading...

Share This Page