Jump to content

GUI designer for easy and fast programming


Recommended Posts



I usually fill the gaps in my needs for running the computer by programming more or less complete/clean bash scripts, with a bit of zenity if needed, and by putting lanchers upon them.


Now I'm at a point where zenity is not enough. I want several GUI controls in a single window. BUT…

My family life, and my professionnal life, make it so that I have very little time for programming.


So I need a very quick way of programming a GUI, and of programming the event handlers. And I don't want my programs to require an exotic runtime or launcher. So it'll have to be either Perl, Python, bash, or Tcl/Tk (installed by default on any mainstream Linux), or a tool that generates a binary (if that exists).


My first attempt has been with Visual Tcl; it's a bit rough around the edges, but still usable, and stable enough. Unfortunately, this tool has not been updated since 2007, and suffers from incompatibilities with Tcl 8.5 or newer (and we're at 8.6…). This can be patched (see “Tristan 2008-09-29â€) but still, I was disapointed to see that the much-advertised “widget†array did not work (any more?)…


So I decided to search for more GUI designers… I found nothing else related to either bash or Tk, the two languages I had in mind for fast programming. My need for speed rules out C/C++, as well as Java (the language I'm most familiar with).


Looking further, I found seemingly great wxWindow-related tools, for Python, a language I'm willing to learn as it seems to fit my criteria (which is: as few written lines as possible to get the job done) :

— Boa-Constructor: nice first impression although the GUI is a bit overwhelming, but it is way too unstable. The IDE crashed at each of my ten attempts to achieve the same simple app I had programmed with Visual Tcl, and before I could even attempt to program event handlers.

— PythonCard: clean (and stable, it seems) and simple, but too much so : I miss the wx sizers.


Looking still further, I finally found some hope :

— wxGlade: at last something that I can use! Simple and to the point. All is there without fuss and with no crash. It is just an UI designer though, that generates a python file that you open in your favourite editor and where you program the event handlers at the right places. Although this is OK with me, I'd like something more integrated, where you take no risk of breaking the GUI code while programming the event handlers, nor loosing your handling code when re-generating the UI; that's because eventually, I'm thinking of using what I'll have found for teaching the basics of programmation to my son. Anyway, this is so far my best finding.

— wxFormBuilder: I did not try yet (not in Mdv's repositories); I'll have to.

— WideStudio: I did not try yet (not in Mdv's repositories); I'll have to (but I really wonder what this MWT is, how it integrates the desktop, and what needs to be installed at runtime).


And in case I find nothing appropriate, I keep bookmarks for Code::Blocks, Gambas, Lazarus, Anjuta, KDevelop and MonoDevelop.


What do you all use for quick and not-so-dirty GUI-app programming? Do you know what tool would suit my needs, if possible with a good learning potential for kids?



Link to comment
Share on other sites

Thank you both for your answers!


It's interesting to see that you both recommend qtDesigner. I'll have to test it.

It's also interesting to see Glade mentionned, because it hapens my prefered tool so far is actually modeled after Glade, hence its name: wxGlade.


While I'm at it, wxGlade did a great job! Back from work, I clicked the “Generate†button, and opened the result in Geany. I was amazed at how few lines there were, and very readable at that! Compared to the 406 lines of Tcl/Tk generated by VisualTcl (my handlers included), the file generated by wxGlade, along with my handlers, is barely 80 lines! AMAZING! Let you see:


#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Wed Jul 15 21:00:21 2009

import wx
import subprocess

# begin wxGlade: extracode
# end wxGlade

class MyFrame(wx.Frame):
 def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.lblTitre = wx.StaticText(self, -1, "Gestion du MediaCenter SFR")
self.txtSortie = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE|wx.TE_READONLY|wx.HSCROLL|wx.TE_WORDWRAP)
self.btStatus = wx.Button(self, -1, "Statut")
self.btStart = wx.Button(self, -1, u"Démarrer")
self.btStop = wx.Button(self, -1, u"Arrêter")


self.Bind(wx.EVT_BUTTON, self.handleStatus, self.btStatus)
self.Bind(wx.EVT_BUTTON, self.handleStart, self.btStart)
self.Bind(wx.EVT_BUTTON, self.handleStop, self.btStop)
# end wxGlade

 def __set_properties(self):
# begin wxGlade: MyFrame.__set_properties
self.SetTitle("Gestion du MediaCenter SFR")
self.lblTitre.SetFont(wx.Font(14, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "Sans"))
# end wxGlade

 def __do_layout(self):
# begin wxGlade: MyFrame.__do_layout
szFenetre = wx.BoxSizer(wx.VERTICAL)
szActions = wx.BoxSizer(wx.HORIZONTAL)
szFenetre.Add(self.lblTitre, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
szFenetre.Add(self.txtSortie, 1, wx.EXPAND, 0)
szActions.Add(self.btStatus, 0, 0, 0)
szActions.Add(self.btStart, 0, 0, 0)
szActions.Add(self.btStop, 0, 0, 0)
szFenetre.Add(szActions, 0, wx.ALIGN_CENTER_HORIZONTAL, 0)
# end wxGlade

 def handleStatus(self, event): # wxGlade: MyFrame.<event_handler>

 def handleStart(self, event): # wxGlade: MyFrame.<event_handler>

 def handleStop(self, event): # wxGlade: MyFrame.<event_handler>

 def displayOutput(self, param):
pipe = subprocess.Popen(["/opt/mediacenter/mediacenter", param], stdout=subprocess.PIPE, stderr=subprocess.STDOUT);
result = pipe.communicate()
# end of class MyFrame

if __name__ == "__main__":
 app = wx.PySimpleApp(0)
 GestionduMediaCenterSFR = MyFrame(None, -1, "")


I'm still interested in others' experience, though, and I will look into qtDesigner and Glade.




I forgot: here's basically the look of it:

|		 frame title		 |
|| …command output…		  ||
| [Statut][Démarrer][Arrêter] |

Edited by theYinYeti
Link to comment
Share on other sites

I tried Glade3. It was uselessly more complicated than wxGlade, while giving nothing more in return. And in the end, the python code did not display the frame… (very basic code taken from internet). While I would be able to circumvent such difficulties, my son would not.

All in all, Glade3 isn't as good as wxGlade; neither for me nor for my son (one day…).


I had a first look at qt4-designer. It is of course targetted at Qt, not Gtk, but anyway I'll just forget this little inconvenience. This tool looks more complicated than Glade, but at the same time more intuitive and thus more usable. Besides, it seems not to be “integrated†in that handlers cannot be coded while using the tool (the same goes with Glade); and it seems rather targetted at C/C++, although I'm sure something can be done with Python.

Well, that first impression is not all that bad, and I'll get back to it in a matter of hours…


So far, wxGlade seems to be the winner for my needs, but nothing is final yet :)



Link to comment
Share on other sites

Well… I did look deeper into qt4-designer. And I'm not enthusiastic about it.


It is indeed a very complete and well thought-out tool (the slots-thing is impressive), but like all the other tools (except VisualTcl), it lacks in-place editing of event-handling code. So for it to be my tool of choice, it has to offer something else… and it does not:

— The “.ui†file needs to be post-processed to have usable files. I've only read about post-processing for usage in C/C++ but I'm confident I could have found the same for usage in Python. Either way, that's one more step before actual usage of the application, and I'm looking for the easiest and fastest possible way from programming to app usage.

— qt4-designer's GUI is targeted at programmers and it shows; for example, widgets' properties are shown class by class (eg: first QWidget, last QPlainTextEditor), and they are very numerous. While it allows total control for the experienced programmer, it is a hindrance (even for the experienced) when the goal is speed; besides, a less-experienced programmer would easily get lost (or loose still more time).


So, I'm still with wxGlade, although it is not perfect.

Please share your experience or opinion (maybe I did not see something I should have), or tell about other tools you know about.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...