Installation and configuration of Maemo SDK (Nokia mobile OS for N900 and other phones) and PyQt4 libraries.
To run PyQt4 on Maemo - Nokia N900 operating system you need to either use the device or install SDK and Scratchbox on your computer (32-bit Linux best). How to do it can be found on maemo.org. To install the SDK you have to use a GUI installer (if it works, not for me), or two bash scripts that download and install most of the packages.
Download install scripts from Nokia web page. Run the scratchbox installer:
maemo-scratchbox-install_5.0.sh -s /path/
Where the "path" is a filesystem path where the scratchbox will be installed (common is /scratchbox or /opt/scratchbox). The script will download and install packages.
Next run the SDK install script with the same path
Xephyr is a light X server which is available with base X.org package or as a separate package. To run Maemo we start a small window - Xephyr server - in which the system will show up. To run Xephyr execute:
We need to instal Nokia proprietary packages to use Maemo. Go to Nokia page and agree to their terms. You will get a code snippet with a token to the proprietary repository. Add it to /etc/apt/sources.list and execute:
When you have everything ready - login to Scratchbox and add extras repository if you didn't. Add to /etc/apt/sources.list:
deb http://repository.maemo.org/extras-devel/ fremantle free non-free
And after that run apt-get update. Using apt-cache search you can search for packages. PyQt4 currently is python2.5-qt4. There is also PySide, PyGTK and wxPython available. To run PyQt4 or other Python application inside Maemo you need to launch the system in Xephyr from one terminal, and in second one - login to Scratchbox and run the script - it should show up in Xephyr.
Using python2.5 run your PyQt4 scripts. Most of them should work (I had few segfaults). Here is a simple example of QWebPage (webkit) in action on Maemo and on desktop Linux:
Note that not all widgets have their mobile version: