7

My girlfriend asked me if there was a tool (actually, an IDE) that would let her create her GUI visually and edit functions associated with GUI-related events with little effort.

For example, she wants to double-click a button she just created and immediately see (and edit) the code associated with that button's on-click event. I believe this is what she does in Visual Studio.

The toolkit doesn't matter. She just wants this funcionality.

Is there some tool that accomplishes this?

Thank you.

EDIT: Made the example look bold. Seemed no one was looking at it, and it's an important requirement.

1
  • why is it so important for her to edit code after clicking? Python code can be written in the vi. The most important thing is being able to visually see what the design is and make changes if necessary.
    – Igor
    Oct 4 at 14:28

7 Answers 7

8

I would recommend based on your needs:

  • Qt Designer
  • wxGlade

Check this out: http://wiki.python.org/moin/GuiProgramming

2
  • 1
    +1 for the link to GuiProgramming. Direct link to ‘GUI Design Tools and IDEs’ subsection: wiki.python.org/moin/GuiProgramming#GUIDesignToolsandIDEs
    – sastanin
    Dec 27, 2009 at 22:50
  • 1
    Do any of those fulfill the "double-click and edit event's code" requirement? I'm taking a look at Qt Designer and I can't find that. And I don't remember wxGlade had that either. Correct me if I'm wrong. Dec 28, 2009 at 1:06
2

For GTK+ there is Glade. Python can load interface files created with Glade. There are some tutorials on the net.

Glade

For Qt there is QtDesigner. PyQt manual covers how to use PyQt with QtDesigner.

As far as I know QtDesigner is integrated into some IDEs (e.g. Eclipse)

1
  • 3
    Glade is good, but it won't solve your example problem. Glade keeps the interface completely separate from the code. This keeps it portable between languages, but prevents things like your example.
    – Matthew
    Jan 1, 2010 at 6:23
2

Python(x,y) includes an installation of Eclipse with PyDev and QT Designer integrated. If you configure PyUIC to run from Eclipse (see this brief HOWTO) then, once the GUI has been designed, the framework code can be generated at the push of a button.

Admittedly this is not as easy or as polished as VS and there may be problems when it comes to refactoring the GUI ...

1
  • This answer is the best so far. However, I've tried installing Eclipse + CDT + QT Designer + QT Designer integration with Eclipse and it's been a PITA. And I'm not sure if I'm going to try this Python(x,y) because it asks me to add a new unknown repository to my Ubuntu. Also, that repository was made for Jaunty (and I have a newer version, Karmic). Anyway, all in all, this is the best answer so far. Dec 28, 2009 at 17:24
1

http://www.codeplex.com/IronPythonStudio

2
  • 1
    I'd recommend IronPython for GUIs. But NOT that program. It's out of date and not supported for current versions. Don't waste your time. Instead make a GUI in VS and use something like Eclipse to consume the form you create.
    – Finglas
    Dec 27, 2009 at 23:01
  • 1
    Thanks for the suggestion. Too bad it doesn't work on GNU/Linux. Dec 28, 2009 at 1:09
0

WxGlade. I'm not sure if you can do the click and edit code thing, but it comes pretty close.

0

Qt Creator is pretty slick. It's for C++ coding only, but Qt manages to make that a bit easier.

0

Hear! Hear! I've been asking the same question. I love the ease of creating and programming a gui that visual studio provides. It is exactly what your girlfriend is talking about. Unfortunately, it doesn't appear to support Python yet for coding of events. I keep hoping Microsoft will recognize the popularity of Python but, for now, VS only supports five languages and Python isn't one of them. You can use VS as an ide for Python code but, it wont allow you to use it in the same way you can those five languages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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