Important: Please read the Qt Code of Conduct -

Checking compatibility of custom framebuffer with Qt application

  • I am new to Qt so please bear with me. I have created a custom framebuffer driver for embedded linux (angstrom) and I have been required to test it against a Qt application.

    I have implemented the write, fillrect, copyarea function. When I ran my hello world app with linuxfb as the platform, I get:

    QPainter::begin: Paint device returned engine == 0, type: 3
    QPainter::drawPoints: Painter not active

    It did not display anything to the LCD but I can't tell which part went wrong.

    Ultimately, how do I tell which function Qt is calling to interface with the framebuffer driver? So that I can tweak my driver to be compatible. Any suggestions will greatly be appreciated.

    I am only using qt's hello world example project.


    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    int main(int argc, char *argv[])
        QGuiApplication app(argc, argv);
        QQmlApplicationEngine engine;
        if (engine.rootObjects().isEmpty())
            return -1;
        return app.exec();


    import QtQuick 2.11
    import QtQuick.Window 2.11
    Window {
        visible: true
        width: 80
        height: 162
        title: qsTr("Hello World")

  • Moderators

    lets first check if your used Qt painting code is correct.
    In case you do the painting (using QPainter) yourself post the code.

  • Hi, thank you for replying.

    In this case, I am just using the default hello world application of the qt. I have edited the question to include the source code.

  • Moderators

    QPainter::begin: Paint device returned engine == 0, type: 3 basically means that there is no valid paint device to paint on, as you have probably already guessed :)
    But i guess this rather has to be debugged in Qt*s FB platform plugin

  • Moderators


    export QT_LOGGING_RULES=qt.qpa.*=true

    and run your application. check if it outputs anything useful which might help with the issue

  • I tried to export that and looked at framebuffer calls. Its seems that qt linuxfb just calls mmap and grabs a pointer to the buffer memory. It then just edits all the pixels using that pointer. Thanks for the suggestion! I was able to track that my framebuffer driver was wrong and was able to change it.

Log in to reply