473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

GUI - Qt Designer

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
6 11433
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: James Geurts | last post by:
Hey all... I posted this in the vs.net ide group too, but people are not answering, so I figured that it might be more appropriate here. I'm not sure if I'm adding a designer to my code properly. ...
19
by: Dales | last post by:
I have a custom control that builds what we refer to as "Formlets" around some content in a page. These are basically content "wrapper" sections that are tables that have a colored header and...
4
by: Dave Taylor | last post by:
I've been using the dataset designer in Visual Studio to create typed datasets for my application by dragging over tables from the Server Explorer and dropping them into the designer. The problem...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
3
by: Tin Gherdanarra | last post by:
A colleague gave me a project where there was a /designer/ window for database connectivity (drag&drop from the toolbox), but I can't find out how to get a /designer/ window in my own project....
4
by: ThunderMusic | last post by:
Hi, I have a custom form that works fine when I debug it or run it in release mode but cannot be loaded in the designer... Actually, it can be loaded in the designer when no control is on it, but...
13
by: cj | last post by:
In a project done in 2003 about a year ago I was told to add the SocketWrench code below into the Windows Form Designer generated code area as shown below. #Region " Windows Form Designer...
2
by: dejavue82 | last post by:
Does anybody know how to resolve the following errors? They were caused by the designer.cs file that was auto-generated by the LINQ to SQL designer. I am using the March 2007 Orcas CTP version of...
8
by: TomC | last post by:
I want to bypass the Windows Form Designer in VS, to create a form programmatically. The elements of the form are to be arranged in a table, and I want the size of the table (and therefore the...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.