- View New Content
- OpenPandora
- General Information
-
Emulation
- Acorn Archimedes
- Acorn BBC Micro
- Amstrad CPC
- Android
- Arcade Machines
- Atari Classic Computer
- Atari ST
- Atari VCS7800
- Commodore Amiga
- Commodore 64 (and more)
- HP-48GX Calculator
- Laser Disc Arcade
- MS-DOS
- NEC PC Engine / TurboGrafx 16
- Nintendo Entertainment System
- Nintendo GameBoy / GameBoy Color
- Super Nintendo
- Nintendo GameBoy Advance
- Nintendo DS
- Sega Master System / GameGear
- Sega Genesis / MegaDrive and AddOns
- Sega Saturn
- Sharp MZ-Series
- SNK NeoGeo Pocket
- Sony MSX
- Sony PlayStation 1
- Sony PSP
- Texas Instruments TI-99
- ZX Spectrum
- Community
- Development
- Contact us
- Donate
-
More
PyQt4 missing module
Started by Eric Jardim, Jun 22 2011 01:44 PM
8 replies to this topic
#1
OFFLINE
Posted 22 June 2011 - 01:44 PM
Hi,
Just a few days ago, I realized that my Pandora came with Python and Qt4.
Long ago (2006) I've designed a tiny kit to rapidly create UI-based applications with no redundancy and clear code, based upon PyQt4. I was curious to port some of my applications to the Pandora just to see if I can use my kit to develop pandora apps.
So I did:
opkg install python-pyqt python-sip
But the uic module is still missing. My kit depends on dynamic ui loading (the loadUi function inside uic module) and ui compiling is not an option.
I read this post and saw that the guy somehow solved the uic problem, but I can't see how?!?!!
http://boards.openpa...020-pyqt4-core/
Can anyone help? Thanks
Just a few days ago, I realized that my Pandora came with Python and Qt4.
Long ago (2006) I've designed a tiny kit to rapidly create UI-based applications with no redundancy and clear code, based upon PyQt4. I was curious to port some of my applications to the Pandora just to see if I can use my kit to develop pandora apps.
So I did:
opkg install python-pyqt python-sip
But the uic module is still missing. My kit depends on dynamic ui loading (the loadUi function inside uic module) and ui compiling is not an option.
I read this post and saw that the guy somehow solved the uic problem, but I can't see how?!?!!
http://boards.openpa...020-pyqt4-core/
Can anyone help? Thanks
#2
OFFLINE
Posted 22 June 2011 - 01:51 PM
Hi you can just put the ui module in the folder with your project ,Hi,
Just a few days ago, I realized that my Pandora came with Python and Qt4.
Long ago (2006) I've designed a tiny kit to rapidly create UI-based applications with no redundancy and clear code, based upon PyQt4. I was curious to port some of my applications to the Pandora just to see if I can use my kit to develop pandora apps.
So I did:
opkg install python-pyqt python-sip
But the uic module is still missing. My kit depends on dynamic ui loading (the loadUi function inside uic module) and ui compiling is not an option.
I read this post and saw that the guy somehow solved the uic problem, but I can't see how?!?!!
http://boards.openpandora.org/index.php?/topic/4020-pyqt4-core/
Can anyone help? Thanks
If you need it ill upload it when I get home tonight, and then just package it up with the rest of your app
#3
OFFLINE
Posted 22 June 2011 - 02:30 PM
Hi you can just put the ui module in the folder with your project ,
If you need it ill upload it when I get home tonight, and then just package it up with the rest of your app
Fine. It only worked when I copied it to the /usr/lib/pythonXX/site-packages/PyQt4 folder. If not, I would have edit the .py files to remove the PyQt4 prefix of all modules. I just want to see if it works.
Unfortunately, it is an old PyQt4 version and pyqtSignal is not defined
But I think I can still port the applications by not declaring signals or creating a custom pyqtSignal. I will meditate about it.
Thanks,
#4
OFFLINE
Posted 22 June 2011 - 02:37 PM
you should be able to have the uic folder in /media/SDcard/pythonapp/PyQt4/uic where your python is run from pythonapp.
Hi you can just put the ui module in the folder with your project ,
If you need it ill upload it when I get home tonight, and then just package it up with the rest of your app
Fine. It only worked when I copied it to the /usr/lib/pythonXX/site-packages/PyQt4 folder. If not, I would have edit the .py files to remove the PyQt4 prefix of all modules. I just want to see if it works.
Unfortunately, it is an old PyQt4 version and pyqtSignal is not defined![]()
But I think I can still port the applications by not declaring signals or creating a custom pyqtSignal. I will meditate about it.
Thanks,
I will post the methods I used to get around the pyqtsignal problem also.
The only problem I have is that my uic is not found unless I am in the correct directory when I run it.
#5
OFFLINE
Posted 22 June 2011 - 03:01 PM
It needs to be on your python path, either install it to your nand, setup the PYTHONPATH environment (see python -h) or modify sys.path at runtime (i.e. before importing the module).The only problem I have is that my uic is not found unless I am in the correct directory when I run it.
#6
OFFLINE
Posted 22 June 2011 - 03:06 PM
Oops its not the uic module thats not found but the .ui file.It needs to be on your python path, either install it to your nand, setup the PYTHONPATH environment (see python -h) or modify sys.path at runtime (i.e. before importing the module).
The only problem I have is that my uic is not found unless I am in the correct directory when I run it.
Im working around it at the moment by just hard coding the path in to it when it calls the ui file.
#7
OFFLINE
Posted 22 June 2011 - 04:25 PM
Incase it helps I put this in with my python files for using uic on pandora.
http://www.mediafire...69vqkqqd114qx1y
and to avoid using pyqtslot() I do
self.connect(self.ui.volUpButton, SIGNAL('clicked()'),lambda who="Three": self.volUp())
def volUp(self):
newVol = func.getVolume() + 9
That works for me, hope it helps
http://www.mediafire...69vqkqqd114qx1y
and to avoid using pyqtslot() I do
self.connect(self.ui.volUpButton, SIGNAL('clicked()'),lambda who="Three": self.volUp())
def volUp(self):
newVol = func.getVolume() + 9
That works for me, hope it helps
#8
OFFLINE
Posted 22 June 2011 - 06:51 PM
you should be able to have the uic folder in /media/SDcard/pythonapp/PyQt4/uic where your python is run from pythonapp.
I will post the methods I used to get around the pyqtsignal problem also.
Right now, I just want to see if PyQt4 works. So I put it in the site-packages and tried to run some simple apps.
They ran, BUT the dynamic loading didn't work correctly and some widgets (in particular ListWidgets) did'n appear. Are you having this same problem?
PS. Right now I am firewalled and can't access your files.
#9
OFFLINE
Posted 22 June 2011 - 07:10 PM
and to avoid using pyqtslot() I do
self.connect(self.ui.volUpButton, SIGNAL('clicked()'),lambda who="Three": self.volUp())
def volUp(self):
newVol = func.getVolume() + 9
That works for me, hope it helps
You should take a look a the kit I developed. The idea is that you don't have to do explicit "connects" to set up event handlers. Suppose you make your widget in QtDesigner and name it MyForm and save it in myform.ui file.
all you have to do is create a myform.py file with:
from mu import *
class MyForm( Form(QWidget) ):
def init(self):
# optional startup without need to call super contructors
def on_volUpButton_clicked(self):
newVol = func.getVolume() + 9
# as this is the main file you can launch the application like this
form = MyForm()
form.run()
And voilá! All the dirty is hidden under the carpet. There are another features but the idea is to have simplicity and no redundancy.
The kit is somehow stable and is fine for working with many forms. It is very good to create simple applications with simple coding. Some complex job may become simple with the power of Python, Qt4 and the good use of software design.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users



