Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Checking compatibility of custom framebuffer with Qt application
Forum Updated to NodeBB v4.3 + New Features

Checking compatibility of custom framebuffer with Qt application

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 961 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    ENzero
    wrote on 25 Sept 2018, 10:40 last edited by ENzero
    #1

    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.

    main.cpp

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    
    int main(int argc, char *argv[])
    {
        QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    
        QGuiApplication app(argc, argv);
    
        QQmlApplicationEngine engine;
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
        if (engine.rootObjects().isEmpty())
            return -1;
    
        return app.exec();
    }
    

    main.qml

    import QtQuick 2.11
    import QtQuick.Window 2.11
    
    Window {
        visible: true
        width: 80
        height: 162
        title: qsTr("Hello World")
    }
    R 1 Reply Last reply 25 Sept 2018, 12:47
    0
    • E ENzero
      25 Sept 2018, 10:40

      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.

      main.cpp

      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      
      int main(int argc, char *argv[])
      {
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      
          QGuiApplication app(argc, argv);
      
          QQmlApplicationEngine engine;
          engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
          if (engine.rootObjects().isEmpty())
              return -1;
      
          return app.exec();
      }
      

      main.qml

      import QtQuick 2.11
      import QtQuick.Window 2.11
      
      Window {
          visible: true
          width: 80
          height: 162
          title: qsTr("Hello World")
      }
      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 25 Sept 2018, 12:47 last edited by raven-worx
      #2

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

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • E Offline
        E Offline
        ENzero
        wrote on 25 Sept 2018, 17:16 last edited by
        #3

        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.

        R 2 Replies Last reply 25 Sept 2018, 17:52
        0
        • E ENzero
          25 Sept 2018, 17:16

          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.

          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 25 Sept 2018, 17:52 last edited by
          #4

          @ENzero
          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

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • E ENzero
            25 Sept 2018, 17:16

            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.

            R Offline
            R Offline
            raven-worx
            Moderators
            wrote on 25 Sept 2018, 20:15 last edited by raven-worx
            #5

            @ENzero
            try

            export QT_LOGGING_RULES=qt.qpa.*=true

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

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            E 1 Reply Last reply 28 Sept 2018, 09:01
            1
            • R raven-worx
              25 Sept 2018, 20:15

              @ENzero
              try

              export QT_LOGGING_RULES=qt.qpa.*=true

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

              E Offline
              E Offline
              ENzero
              wrote on 28 Sept 2018, 09:01 last edited by
              #6

              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.

              1 Reply Last reply
              0

              4/6

              25 Sept 2018, 17:52

              • Login

              • Login or register to search.
              4 out of 6
              • First post
                4/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved