Is there an GUI Designer for python?
Solution 1
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
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
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
To get to the app's code, run
quickly edit
Go to the
HelloWorldWindow.py
fileNow 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.
See also, some related questions:
Solution 2
Qt-Designer
- Qt5 is also available.
- qt4-designer
- 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 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)
Solution 3
Are you after a full IDE (ie, code editor, runtime environment, UI layout tools), or just a utility to create the UI?
If it's a full programming environment you're after, have a look at the Quickly toolset.
If you're just looking to design interfaces, you can use the 'glade' designer to lay-out your interface using GTK widgets, then load that UI definition into any python program. There's a GTK+ and Glade3 GUI Programming Tutorial (with both Python and C examples).
Solution 4
Eric IDE
Try with Eric IDE. I think its the best IDE both for Python and Qt4.
Solution 5
wxFormBuilder
It also depends which widget toolkit you want to use. I prefer wxWidgets with python, wxPython.
So my preference for building the GUI's is wxFormBuilder, it is avaialable from following PPA:
It has the nice simple drag and drop of widgets onto a canvas, and you can quickly switch to the code tab to see what it has generated, which to my untutored eye is clean and uncluttered. As the name on the tin says it is a form builder, that's what it specializes in. So don't expect to develop a full project with it, however if you like to keep the form design separate to the analysis code then it does the job well.
Related videos on Youtube
pydsigner
Updated on September 18, 2022Comments
-
pydsigner over 1 year
Is there a GUI IDE for programming python just like java has netbeans?
I wanted one where we could drag & drop test boxes & labels just as we do in swing components using netbeans or eclipse.
Or is there an add-on present in either netbeans or eclipse itself?
-
Admin almost 13 yearsHave you looked in the Ubuntu Software Center at some of the items listed under Developer Tools > Python ?
-
Admin almost 13 yearsI personally recommend trying to craft something by hand following a tutorial, because if you don't grasp how the elements you draw interact with each other, you'll have a hard time getting buttons to work and such.
-
Admin almost 13 yearsNote though that, for anything non-trivial, gtk apps that don't use glade or something similar will look fairly ugly and complicated very quickly. Even using glade, you will still have plenty of chances to learn about the pygtk api.
-
Admin over 7 yearsI up voted for anything like Visual Studio for Python?
-
-
Eric Wilson almost 13 yearsCan Eclipse build a GUI? Even in Java?
-
Jason Southwell almost 13 years@FarmBoy: yes it can.
-
Javier Rivera almost 13 yearsWhy was this downvoted?. Eric is a nice Python GUI that integrates QT development. It can design GUIs (using QT Designer), and it even compiles the .ui files to python (no need to use the command line). It's kinda a Eclipse or Visual Studio for pyQt. It's too heavy for my taste, but it is an interesting option for others.
-
Nathan Osman almost 13 yearsThis answer is so good it's going to be a benchmark for others :)
-
flo almost 13 yearsHas the pydev perspective got a GUI designer?
-
Christoph over 11 yearsThe stock Ubuntu version can't generate Python code for some reason. I hope the PPA version doesn't have that problem.
-
Christoph over 11 yearsyes the PPA version can generate python code.
-
fouric about 11 yearsThe OP specifically mentioned that he wanted a GUI designer.
-
osirisgothra almost 9 yearsactually, the community edition is free (4.5) and to be fair, none of the other answers really provided a GUI-building IDE either, they just mention half cocked solutions for getting around it --- and for the record, PyCharm is a good suggestion as long as you know how to use it (and yes it can be used with GUI builders the same as the others can) -- you might want to add that note to your answer if you want to recover some of the lost rep
-
renatov over 8 yearsI found glade a terrible and buggy RAD.
-
Jeremy Kerr about 6 years@JavierRivera: likely because this looks like an IDE, not a GUI designer.