Release: PyQt 4.8.5 (BETA) for Qt 4.7.0


Works a treat! I ran a pyqt4 based Tetris game and she ran fine.

Good to hear!!!


Indeed, some apps may run fine, but they will fail if they need any file in the plugins/ folder. Unfortunately the qt build search for them at the /mnt/utmp/kde-libs/plugins and a simple symbolic link works around. But I dont know why other problem appear when I do this (cant resize windows).
 
Indeed, some apps may run fine, but they will fail if they need any file in the plugins/ folder. Unfortunately the qt build search for them at the /mnt/utmp/kde-libs/plugins and a simple symbolic link works around. But I dont know why other problem appear when I do this (cant resize windows).



Code:
export QT_PLUGIN_PATH="$HOME/lib/qt4/plugins:$QT_PLUGIN_PATH"

is all you need ;)
 
Code:
export QT_PLUGIN_PATH="$HOME/lib/qt4/plugins:$QT_PLUGIN_PATH"

is all you need ;)

This env. variable solves the linking problem, but there is something wrong with the OpenGL graphicsystem plugin. When Qt don't find it, it uses the default software backend and everything is Ok. But try resizing a window when the plugin is loaded.
 
Eric, I have installed the PND. It only asked me for my password and then disappeared. Is it OK? Is there any way to know if the installation has been successful? My program in Python still shows the error ImportError: cannot import name uic. Thanks a lot.
 
is it 'uic' or should i tbe sometghign like qt.uic or Qt4.uic or...? I forget now, been too long since I've started from scratch on that, but be sure you're qualifying it right for pyqt4 :) (it is different to pyqt3)


jeff
 
is it 'uic' or should i tbe sometghign like qt.uic or Qt4.uic or...? I forget now, been too long since I've started from scratch on that, but be sure you're qualifying it right for pyqt4 :) (it is different to pyqt3)


jeff
What I have on my program is



Code:
from PyQt4 import QtCore, QtGui, uic
 
is it 'uic' or should i tbe sometghign like qt.uic or Qt4.uic or...? I forget now, been too long since I've started from scratch on that, but be sure you're qualifying it right for pyqt4 :) (it is different to pyqt3)


jeff
What I have on my program is



Code:
from PyQt4 import QtCore, QtGui, uic


I am sure you are runing:



Code:
$ python yourscript.py



But it will not magically see our PyQt and Qt. You should run instead:



Code:
$ pyqt-run yourscript.py


The PyQt installer ask your password to install this pyqt-run script at your Pandora's /usr/bin


I should have put a dialog, just after the instalation explaining this. Sorry. I should also put a doc file explaining this. That's why I called it a BETA ;)
 
I am sure you are runing:



Code:
$ python yourscript.py



But it will not magically see our PyQt and Qt. You should run instead:



Code:
$ pyqt-run yourscript.py


The PyQt installer ask your password to install this pyqt-run script at your Pandora's /usr/bin


I should have put a dialog, just after the instalation explaining this. Sorry. I should also put a doc file explaining this. That's why I called it a BETA ;)
Indeed I was doing what you mentioned :p


Thanks a lot for the tip. Now I can see a different error. Strangely is complaining about a zero length field name in format. I said strangely, because in Windows doesn't crash. It may be related with different versions of Pyhton and/or pyQT?
 
I advanced a bit more close to completion. Now I'm getting error Invalid conversion specification


This happens wherever I'm trying to show numbers. I have tried 2 different ways:



Code:
widget.label_onlinePlayers.setText('{:,}'.format(int(self.server_onlinePlayers)) + ' players online')


widget.label_onlinePlayers.setText(format(int(self.server_onlinePlayers), ',d') + ' players online')


As before it works on Windows, but fails on the OP. How do you show numbers with separator for thousands and decimals? Thanks a lot.


EDITED: found a workaround that works in both systems :-D Great to see my little application running on the OP. Now I have to learn how to put all together on a PND.
 
Last edited by a moderator:
EDITED: found a workaround that works in both systems :-D Great to see my little application running on the OP. Now I have to learn how to put all together on a PND.

Please, consider putting in 2 PNDs.


First, one must install this PyQt PND (and leave it in the same SD card that he/she installed).


Then one may put your Python app into another (small) PND. You may create a shell script that tests if the PyQt PND was correcly installed and then "pyqt-run" your app.


If you want, I may help you with this.
 
Last edited by a moderator:
EDITED: found a workaround that works in both systems :-D Great to see my little application running on the OP. Now I have to learn how to put all together on a PND.

Please, consider putting in 2 PNDs.


First, one must install this PyQt PND (and leave it in the same SD card that he/she installed).


Then one may put your Python app into another (small) PND. You may create a shell script that tests if the PyQt PND was correcly installed and then "pyqt-run" your app.


If you want, I may help you with this.
Thanks Eric. That's a great idea about about test if the PyQt PND was correcly installed.


And... indeed, I'm going to need you help on how to create a PND. I'm clueless. Any documentation? Thanks a lot for all your help and time.
 
Last edited by a moderator:
Thanks Eric. That's a great idea about about test if the PyQt PND was correcly installed.


And... indeed, I'm going to need you help on how to create a PND. I'm clueless. Any documentation? Thanks a lot for all your help and time.

The PyQt installation process is very simple. The main task is to find the exact path to the PyQt PND file. If your SD card name is "mysd", when you stick it into the Pandora, it will be mounted as "/media/mysd". If there is no name it uses a strange name that depends on the slot you stick it.


Suppose you want to install PyQt on this hypothetic SD card. First, you drop the PyQt PND at some special folder (pandora/menu or pandora/desktop). Then, the install script "finds out" where it is (let's say, "/media/mysd/pandora/menu") and writes it to a file named .pyqtpnd (or .pyqtpath just not remember now) at your home dir (say, /home/stratego)


Further, the installer copies the "pyqt-run" and "pyqt-env" scripts to your /usr/bin folder, so you can run PyQt apps properly.


As I said before, pyqt-run sets the environment variables (using pyqt-env) to make python find PyQt and Qt at /mnt/utmp/pyqt subfolders. This folder will be mounted and unmounted explictly by pyqt-run using the information in .pyqtpnd file (that's why you need the instalation).


The installation is obviously not necessary, but an ordinary user would never be able to play with PyQt without knowing about the pnd_run script and the correct env variables setup.


---


About making the PND:


Put all your files at some folder, create a PXML.xml file (take a look at the pandorawiki), make a beautiful icon.png for you app and create a start.sh script that will basically have:


# some optional pyqt correct installation test, and


pyqt-run myapp.py


Then you should run the pnd_make with some options:


-p PNDNAME


-d DISTFOLDER


-x PXMLFILE


-i ICONFILE


-c (compress with squasfh, not iso)


Since I suppose your app will only have one start script, you will only need to write one entry at the PXML file. Take a look at mine and adapt to your app

<?xml version="1.0" encoding="UTF-8"?>


<PXML xmlns="http://openpandora.org/namespaces/PXML">


<application id="pyqt-install.sh-2318" appdata="pyqt">


<exec command="pyqt-install.sh"/>


<title lang="en_US">PyQt Installer</title>


<author name="EricJardim" website="http://www.openpandora.org" email="ericjardim@xxx" />


<version major="4" minor="8" release="5" build="1"/> <!--This programs version-->


<osversion major="1" minor="0" release="0" build="0"/> <!--The minimum OS version required-->


<description lang="en_US">PyQt - Python bindings for Qt. PyQt version: 4.8.5. Qt version: 4.7.0 (sebt3 build)</description>


<icon src="icon.png"/>


<info name="pyqt documentation" type="text/plain" src="/mnt/utmp/pyqt/readme.txt"/>


<categories>


<category name="Utility" />


<category name="Qt" />


</categories>


</application>


</PXML>


Well, that's it. Not very difficult, is it? :D


---


I am thinking of releasing a new PND for PyQt with the plugins path (missing in the pyqt-env), remove the buggy opengl graphicsystem plugin, and put some documentation of how to install and use PyQt (at least) and how to distribute PyQt apps as PND (we can use this thread as reference).
 
Eric, many thanks for the instructions. As soon as I have some free time (currently really busy with multiple projects) I'll give it a try and report back here.
 
Still working on this, but today CCP (EVE's developer) has changed the way the API works, and now my program doesn't work anymore :angry:
 
Has anybody tried this with Hotfix 6 installed? It doesn't work for me. pyqt-run shows an error message saying I should reinstall it.
 
Is this still active? I haven't been able to run my pyQT programs since Hotfix 6.

Sorry. I am Pandoraless. She went on a vacation to bavarian lands, will meet the creator and fix the LCD cable.


Can't help right now. Hope you can wait a little, since she said she's coming back to me...


EDIT: and sorry for not answering before. I have been very busy since January
 
Last edited by a moderator:
Back
Top