Skip to content

Qt/3D Running on N900

Qt Labs is the place where you can follow the direction of the Qt development. Of course it’s worth to follow the Qt Roadmap also. If you are interested in about what’s happening in Qt world, it is definitely worth to follow the Labs (in my opinion).

One of the most interesting projects at the moment is Qt/3D. As you might have noticed Qt doesn’t support 3D in painting when using  QPainter, but now there is ongoing project called Qt/3D which brings this to Qt world.  Instead of QPainter you can use QGLPainter for 3D drawing. There has been been possibility to use OpenGL before, but what Qt/3D brings is a Qt way to do that. Which is nice.

There are good blog posts about Qt/3D in Qt Labs blog section. So it doesn’t make sense for me to write more about this subject. You can check out the blog posts:

I decided to take a look at if it is possible to run Qt/3D applications on N900 and yes, it is possible. Below is a video where I run several Qt/3D demos on N900. The following demos are ran on the video:

  • cubeaccel – A simple cube demo that reacts on device accelenometer values
  • pageflip – A demo which models how to switch a newspaper page
  • teapot – The classic 3D “Utah Teapot”
  • planets – A demo which demonstrates the animation done with QSphericalAnimation

Building Qt/3D for N900

Basically what is required for running Qt/3D applications is that you need to have a source tree of Qt 4.6 (built Qt version) and you need to have private headers there.  Qt must have been built with OpenGL support. So here are the steps that I made:

  • Build and install Qt 4.6 with “-opengl es2” option in scratchbox
  • clone the Qt/3D from gitorious: git clone git://
  • cd qt3d
  • export QTSRCDIR=/path/to/qt/source/tree
  • ${QTSRCDIR}/bin/qmake -recursive -cache ${QTSRCDIR}/.qmake.cache
  • make & make install
  • After this you should find examples from “qt3d/bin” directory. For some reason the libQt3D were not installed under the Qt install dir. It was in “qt3d/lib”. Check the next paragraph about the problems that I had.

One thing that I have never fully understood is that what is the correct way to build these “unreleased” modules when they depend on Qt private headers? If there are any Trolls reading this, could you please inform me about what is the right way to do this? I found some difficulties to install Qt3D stuff with “make install”. There were also some problems with the Qt3D unittests so I needed to disable them from the file.


In my opinion, it seems that Trolls have done good work, once again. Even though Qt/3D is not released yet, you can do things with it quite easily and really run Qt/3D based applications. They work quite well on N900 also, but I believe there is still some work left to do. What comes to the QML and Qt/3D, it is really amazing that how these thing can be combined together. Check the Henrik Hartz’s video about Declarative UI and Qt/3D from here. Thanks for reading.

Published inMaemoQt


  1. mbm mbm

    Awesome work! I especially like the pageflip demo.

    • zchydem zchydem

      @mbm Yes, but the Trolls have been done all the work. I just promote their great achievements.

      • mbm mbm

        @zchydem Thanks, it’s always great to see Qt being used for cool stuff like this. :)

  2. s@ssoni s@ssoni

    Hi! Thanks for the demo! Hopefully you’ll see my late comment :-) I built the 3D extension successfully and the examples work fine on the desktop, but I am having deployment troubles. Should I built it also on the Nokia or is copying the libraries enough?


    • zchydem zchydem

      @s@ssoni If you want to run Qt3D on N900 you need to have cross compiled binaries/libraries for the device. With a little googling, there is already built packages for Maemo5.

      What you need to do is to install plugins on device and run the example there. Naturally, if you want to run something of your own, you need to build ARM binary first e.g. using scratchbox, copy it to your device and run the app.

      I hope this helped you.

  3. s@ssoni s@ssoni

    Thanks for the link, I installed those packages in my Nokia and the examples are installed and run fine. However, when I try to run my own code in the device, it cannot find libQt3d, although it is in /usr/lib (I tried both -the libs that were installed with those packages and the libs after I built it for maemo-). I don’t use scratchbox, usually I create the package and install it in the device throught Qt, so I don’t know if I am missing something on the way!

    • zchydem zchydem

      @s@ssoni If your application can’t find libQt3d try to set library path e.g. “export LD_LIBRARY_PATH=/path/to/libQt3d”. IIRC Qt should be installed to the same location where you build your app (in the host) and in the target (n900).

Leave a Reply

Your email address will not be published. Required fields are marked *