By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,517 Members | 1,752 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,517 IT Pros & Developers. It's quick & easy.

GUI - Qt Designer

P: n/a
Is there any way to take the output produced by Qt designer (or any other
GUI designer) and use it in Python to create a screen? There must be a
better way of creating screens than having to use the TkInter routnes and
add every widget one by one in the program.

John Bradbury
Jul 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
John Bradbury <jo***********@skiptalk21.com> writes:
Is there any way to take the output produced by Qt designer (or any
other GUI designer) and use it in Python to create a screen? There

[...]

PyQt. It includes pyuic, which does what you want.
John
Jul 18 '05 #2

P: n/a
John Bradbury wrote:
Is there any way to take the output produced by Qt designer (or any other
GUI designer) and use it in Python to create a screen? There must be a
better way of creating screens than having to use the TkInter routnes and
add every widget one by one in the program.

John Bradbury

You need PyQt and/or PyKDE.

You can use pyuic DialogWhatever.ui > DialogWhatever.py to convert the
QtDesigner *.ui file to a python file.

Then you can import it into a PyQt app and use it like any other python Qt
class.

One warning, however: It's not as easily portable as Tkinter. On windows,
especially, it's pretty much only usable if you've bought the full Qt
Commercial verson. The free version of Qt/Win only goes up to version 2.3.

Boa-constructor is alpha still, but usable to make wxPython apps in a RAD
environment.

PythonCard was another alternative, but I'm not sure if it's still being
maintained.

Hope that helps!

cya,
Eric

--
---
s- should be removed to contact me...
Jul 18 '05 #3

P: n/a
On Wednesday 12 November 2003 6:04 pm, John Bradbury wrote:
Is there any way to take the output produced by Qt designer (or any other
GUI designer) and use it in Python to create a screen? There must be a
better way of creating screens than having to use the TkInter routnes and
add every widget one by one in the program.


Use the pyuic utility that comes with PyQt.

Phil
Jul 18 '05 #4

P: n/a
John Bradbury <jo***********@skiptalk21.com> pisze:
Is there any way to take the output produced by Qt designer (or any other
GUI designer) and use it in Python to create a screen?


You are not limited to PyQt, wxPython has few nice GUI designers, of
which wxGLADE seems to be the easiest to use. Or -- at you will -- you
can use xrc resources, wchich are native to wxWindows and can be shared
between wxPython and wxWindows applications.

The window designs (frames, forms) created with Qt Designer can be
translated to Python code using pyuic tool. BlackAdder IDE has this
support built-in, although I never tried this approach.

--
Jarek Zgoda
Unregistered Linux User #-1
http://www.zgoda.biz/ JID:zg***@chrome.pl http://zgoda.jogger.pl/
Jul 18 '05 #5

P: n/a
Phil Thompson wrote:
On Wednesday 12 November 2003 6:04 pm, John Bradbury wrote:
Is there any way to take the output produced by Qt designer (or any other
GUI designer) and use it in Python to create a screen? There must be a
better way of creating screens than having to use the TkInter routnes and
add every widget one by one in the program.


Use the pyuic utility that comes with PyQt.

Phil

Thanks everyone for the very helpful repsonses. It seems to be a topic whch
is not covered fully in the books ( at least the ones I have).

John
Jul 18 '05 #6

P: n/a
John Bradbury wrote:
Thanks everyone for the very helpful repsonses. It seems to be
a topic whch is not covered fully in the books ( at least the
ones I have).


Since you mentioned books ...

http://www.opendocs.org/pyqt/

Jim
Jul 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.