Important: Please read the Qt Code of Conduct -

[SOLVED] Statically linked Qt and gfx-transformed driver

  • I'm developing an Arm cross-compiled application that is linked to Qt4.8 + Qwt statically and uses gfx-transformed drivers to rotate the screen. App is built without errors, but when I try to launch it, that's what happens:

    • #/usr/bin/app -qws -display transformed:Rot270
    • #transformed: driver not found

    Few key points to mention:

    • Qt is configured with -plugin-gfx-transformed, -static and -release flags among others (I'm using BitBake/Yocto to build it along with the whole filesystem image)
    • When Qt is used as shared libraries, everything works fine.
    • If I launch statically linked app without rotation, everything works fine too (except, obviously, the screen is not rotated).

    I suspect the problem might be in my .pro file as I don't include gfx-transformed drivers in any way (don't know if/how to do it and can't google any related info). Any help would be appreciated, thank you in advance.

  • Lifetime Qt Champion


    IIRC, since you do a static build, you should rather build with qt-gfx-transformed so it's builtin your library

  • SGaist, I'll try that too, thanks. Meanwhile, I have solved my problem as described in Qt manual[1] by adding following line to project's .pro file:

    QTPLUGIN += qgfxtransformed

    and this above main() function:

    Not sure how I've missed that page while been googling for a solution earlier..


  • Lifetime Qt Champion

    That's the question I wanted to ask first but I've only thought of writing it :-D

    Don't worry, it's one of the useful document that's always missed when dealing with a static build of Qt

    Since you found out how to make it work, please update the thread title prepending solved so other forum users may know a solution has been found :)

Log in to reply