Sunday, May 16, 2010

Qt Lighthouse - Platform approach of writng drivers

While the previous post provided a method to write to a new plugin using a Screen Driver with 4.6/4.7 versions of Qt, with the upcoming Lighthouse approach, it is possible to do it as a "Platform".

Check out the Lighthouse branch from gitorious using::

git clone git://gitorious.org/~prabindh/qt/prabindhs-lighthouse.git

Configure lighthouse using the below command - note -embedded-lite instead of -embedded ::

>>[QTDIR]$ ./configure -opensource -no-qt3support -no-xmlpatterns -multimedia -no-phonon -no-phonon-backend -no-webkit -no-javascript-jit -no-script -no-scripttools -no-declarative -qt-mouse-tslib -DQT_QWS_CLIENTBLIT -DQT_NO_QWS_CURSOR -R //tslib/ -xplatform qws/linux-arm-g++ -qtlibinfix E -embedded-lite arm
>>[QTDIR]$ make
>>[QTDIR]$ cd src/plugins/platforms
>>[QTDIR]$ make && make install

Once installed on the target, you can run a sample application with this "Minimal" platform, as below:

root@omap3evm:/# /usr/local/Trolltech/QtLighthouse-4.7.0-arm/examples/painting/imagecomposition/imagecomposition -qws -platform Minimal

And the output should come nicely as,


("Minimal")
QMinimalWindowSurface::flush() saving contents to output0000.png

The output will be in the current directory as a file.

This approach can be extended to other drivers. What does this mean for the screen driver ?

NOTE: This is still early days for Lighthouse. Plenty of caveats ...

No comments:

Post a Comment