Reply
Thread Tools
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#1
Hey guys ... Can someone tell me of any simple example which shows how a GUI designed using Qt Designer can be imported into some Python code .. ?

I think I have got the basic Python environment running in my PC now, so I need to move to the next step ..
 
Posts: 107 | Thanked: 74 times | Joined on Jan 2010
#2
You may convert the ui xml file in python code with pyuic4, there is another similiar tool for pyside.
The next step is to create a class to integrate/inherit that code.
IIRC eric4 should manage that automagically for you.
 
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#3
Originally Posted by nicola.mfb View Post
You may convert the ui xml file in python code with pyuic4, there is another similiar tool for pyside.
The next step is to create a class to integrate/inherit that code.
IIRC eric4 should manage that automagically for you.
I know about pyuic4, but I'm not quite sure what you meant in 3rd and 4th lines .. can you elaborate on that a little please ?
 
Posts: 60 | Thanked: 69 times | Joined on Oct 2007 @ Nomad
#4
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#5
this walks you through step by step designing an interface with qt designer, saving the ui file, pyuic4'ing the ui file, writing a "wrapper" .py, and then a "main" .py file to launch it.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following 2 Users Say Thank You to fatalsaint For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#6
Alright thanks for that tutorial ... worked beautifully !!

I got another small question: will all these Python scripts (like the one in the example you have mentioned above) work in the N900 too ? Or do I have to do any changes to them in order for them to work on the N900 ?
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#7
Originally Posted by ahmadka View Post
Alright thanks for that tutorial ... worked beautifully !!

I got another small question: will all these Python scripts (like the one in the example you have mentioned above) work in the N900 too ? Or do I have to do any changes to them in order for them to work on the N900 ?
For the most part they should just work. My python app in my sig runs without modification on an Ubuntu Desktop and on the N900. There's changes to how the they *look* when moving from desktop to n900 but they run.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#8
Originally Posted by fatalsaint View Post
For the most part they should just work. My python app in my sig runs without modification on an Ubuntu Desktop and on the N900. There's changes to how the they *look* when moving from desktop to n900 but they run.
Yeah thats what I thought too .. That the actual look may differ somewhat because of different resolutions, etc ...

So how can I program Python apps on a PC and also know how they may look on an actual N900 ? Is there any N900 emulator kind of a thing for N900 Python developers ? This also relates to my other question here.
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#9
Originally Posted by ahmadka View Post
Yeah thats what I thought too .. That the actual look may differ somewhat because of different resolutions, etc ...

So how can I program Python apps on a PC and also know how they may look on an actual N900 ? Is there any N900 emulator kind of a thing for N900 Python developers ? This also relates to my other question here.
The scratchbox SDK environment allows you to use a Xephyr window to emulate the N900.

Thats what I do my Development and testing on.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#10
Originally Posted by fatalsaint View Post
The scratchbox SDK environment allows you to use a Xephyr window to emulate the N900.

Thats what I do my Development and testing on.
Can you also give me the link to the wiki page here which gives instructions on how to test python scripts on the virtual N900 .. ? I found it once before but I cant find it again ..
 
Reply


 
Forum Jump


All times are GMT. The time now is 15:40.