Running PySide applications on Qt Simulator

Some may have noticed that the Nokia Qt SDK contains a simulator for Qt applications on Nokia devices. It consists of the simulator application, plus Qt libraries built for its platform (Q_WS_SIMULATOR), which basically “wraps” the target application on the simulator window (and allows to simulate various events of the target device).

It has been asked on the Talk whether it would be possible to run PySide applications on the simulator. Technically, it would be as simple as building PySide against the simulator libraries… and indeed it was! Well, at least after a couple of patches, I managed to make it work, as can be seen on the screenshot below (for the curious the application running on it is the “hyperui” demo from pyside-examples repository):

Qt Simulator running PySide

For anyone willing to try, you just need to download the latest PySide code, apply the patches not yet upstream (to the pyside.git tree), and build everything as per official instructions, with these notes:

  • When building PySide, add the directory which contains the Qt tools for the Simulator platform (usually “<SDK_installation_dir>/Simulator/Qt/gcc/bin”) to your PATH (taking care to add it before other directories which contain Qt tools).
  • When building PySide, add -DQ_WS_SIMULATOR=yes to the cmake command. This is necessary because currently CMake does not detect the Simulator platform, thus requiring us to force it.
  • When running applications, remember to set LD_LIBRARY_PATH to point to the Simulator libraries, otherwise the application might try to be run with your system Qt libraries, which will probably fail.

To make testing easier, I built PySide binaries (from git snapshots) for the Simulator libraries shipped in Nokia Qt SDK 1.0. You can download them here. They were built on Ubuntu 10.04 (32-bit), but will probably work on other (32-bit) distributions. Also note it was build for Python 2.6. To use these binaries, unpack the tarball and modify the “qt_sdk_dir” in to point to your Nokia Qt SDK installation directory. Next, run:

./ /path/to/

And your application should run under the simulator (the simulator opens automatically if not already running).


  • Apply required PySide patches upstream (they are currently under review).
  • Attempt to build PySide Mobility as well.
About these ads

About lizardo

I'm a Computer Scientist living in Manaus, Brazil. I'm working at Instituto Nokia de Tecnologia (INdT) with Research & Development on embedded Linux.
This entry was posted in General and tagged , , , . Bookmark the permalink.

5 Responses to Running PySide applications on Qt Simulator

  1. Pingback: PySide applications on Qt Simulator - Home to PyS60 Developers

  2. Marcelo Barros says:

    Fantastic work, Anderson ! I will give it a try ASAP.

  3. m2c says:

    Looks promising, but the instructions are for a Linux environment. Any method to achieve the same for Windows 7?

  4. AHeiner says:


    installed most of it but got stuck at the command

    ./ /path/to/

    what is meant with this (I’m a new one on installing my own SW)


  5. Pingback: Работа с PySide

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s