Qt application screen orientation

I have DigiESP build 20090423-RevA DEL-5.0 and I’m developing an application using Qt, but need the display to use a portrait orientation.

I’ve never developed using Qt before, but after bit of googling I discovered that adding ‘-display transformed:Rot90’ to the application’s command line should have the desired result, but this doesn’t work - I get a ‘transformed: driver not found’ error.

I’m guessing that this is because the Qt libraries supplied with DigiESP are not built with the ‘-qt-gfx-transformed’ option enabled. Is this correct?

If so, then is there some other way to rotate the display orientation or will I need to rebuild the Qt libraries?

If I need to rebuild the libraries, will it be possible to integrate them into DigiESP so that they get put into the rootfs automatically?

Can I use the latest version of Qt (which is 4.6) or should I get version 4.4.3 (the version provided with DigiESP)?

I’ve worked out the solution to this myself, and am posting instructions for updating Qt libraries here in case anyone else needs to use a rotated screen (or any other Qt feature no included in the supplied version).

I had no luck getting Qt version 4.6 to work - I managed to cross-compile the libraries, but when I installed them in the rootfs, I just got a segmentation fault when running applications, so I got the Qt 4.4.3 source from Nokia’s FTP site (ftp://ftp.qt.nokia.com/qt/source/qt-embedded-linux-opensource-src-4.4.3.tar.bz2), and tried that.

I started by trying to duplicate the exact libraries supplied with DigiEL-5.0:

Start a shell, extract the sources and ‘cd’ to the qt-embedded-linux-opensource-src-4.4.3 directory, then:

[b]mv mkspecs mkspecs-orig

cp -a /usr/local/DigiEL-5.0/usr/bin/mkspecs .

cp -a mkspecs-orig/qws/linux-x86-g++ mkspecs/qws (if using x86 host platform), or
cp -a mkspecs-orig/qws/linux-x86_64-g++ mkspecs/qws (if using x86 64-bit host platform)

export PATH=/usr/local/DigiEL-5.0/usr/bin:$PATH

./configure -confirm-license -embedded arm -xplatform qws/linux-arm-g++ -prefix /usr/local/QtEmbedded-4.4.3 -hostprefix /usr/local/DigiEL-5.0/usr -nomake examples -nomake demos -nomake docs -nomake translations -no-rpath -no-pch -no-largefile -no-accessibility -no-stl -no-qt3support -no-webkit -qt-sql-sqlite -depths 15,16 -qt-kbd-usb -qt-mouse-tslib -no-gif -no-libtiff -no-libmng -no-libjpeg -no-freetype

The above process builds the exact Qt libraries supplied with DigiEL-5.0.
To change the functionality built into Qt, modify the above ./configure command line.

./configure -embedded arm -help | less

will list the options available. In my case, I added -qt-gfx-transformed (to allow screen rotation) and removed -no-accessibility (the accessibility feature was needed by an on-screen keyboard widget I was trying to test out).

To install:

make install_subtargets install_qmake

Finally, move the installed plugins into the rootfs:

mv /usr/local/DigiEL-5.0/usr/plugins /usr/local/DigiEL-5.0/rootfs/rootfs_extras/qt-embedded/rootfs/usr/local/QtEmbedded-4.4.3

After this, rebuild your root filesystem with DigiEL to include the new libraries.