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. Qt5 linuxfb platform plugin does not work with 8bit color depth

Qt5 linuxfb platform plugin does not work with 8bit color depth

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 2 Posters 1.2k 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.
  • M Offline
    M Offline
    Meyton_GmbH 0
    wrote on last edited by Meyton_GmbH 0
    #1

    I have ported an embedded application from Qtopia 4 to Qt 5. The Qt 4 application was running on linux framebuffer. The embedded device the application should run on uses the vesafb framebuffer driver. As I understand Qt 5 uses plugins to support different graphic plaforms (like linuxfb and X11). So I'm trying to run the ported application with the linuxfb framebuffer plugin.

    ./myApp -platform linuxfb
    

    My problem now is that the ported application runs fine on machines with at least 16bit color depth. But I have to support old hardware which only supports 8bit color depth. On these devices the application starts, but produces no graphical output at all. On colsole I get the following errors:

    QPainter::begin: Paint device returned engine == 0, type: 2
    QWidget::paintEngine: Should no longer be called
    QPainter::begin: Paint device returned engine == 0, type: 1
    QPainter::begin: Paint device returned engine == 0, type: 3
    QPainter::setCompositionMode: Painter not active
    QPainter::begin: Paint device returned engine == 0, type: 3
    QPainter::setCompositionMode: Painter not active
    QWidget::paintEngine: Should no longer be called
    QPainter::begin: Paint device returned engine == 0, type: 1
    ...
    

    fbset gives the following output on the machine where the graphics do not work:

    mode "1024x768-60"
        # D: 63.500 MHz, H: 47.816 kHz, V: 59.920 Hz
        geometry 1024 768 1024 768 8
        timings 15748 152 48 23 3 104 4
        vsync high
        rgba 8/0,8/0,8/0,0/0
    endmode
    

    Can it be that the linuxfb framebuffer plugin does not support 8bit color depth?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      AFAIK, there should be no such limitation.

      Which version of Qt are you using ?
      Did you cross-compile it yourself ?
      Do you have the same issue with a simple dummy application ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Meyton_GmbH 0
        wrote on last edited by
        #3

        Thank you for your reply!

        I'm using Qt 5.12.8 which is cross-complied via buildroot. I tested it again with this super simple program.

        #include  <QApplication>
        #include  <QLabel>
        
        int main( int argc, char *argv[] )
        {
          QApplication *app = new QApplication( argc, argv );
          QLabel *label = new QLabel( "This is a test!" );
          label->show();
        
          return app->exec();
        }
        

        But the result is still the same. It does not work with 8bit famebuffer. I tested it on another machine which supports 8bit and 16bit color depth. If I switch the framebuffer to 16bit color it runs fine. If I switch the framebuffer to 8bit color depth, I get the same errors as before.

        /tmp/test -platform linuxfb
        
        QWidget::paintEngine: Should no longer be called
        QPainter::begin: Paint device returned engine == 0, type: 1
        QPainter::pen: Painter not active
        QPainter::setPen: Painter not active
        QPainter::setPen: Painter not active
        QPainter::begin: Paint device returned engine == 0, type: 3
        QPainter::setCompositionMode: Painter not active
        QPainter::begin: Paint device returned engine == 0, type: 3
        QPainter::setCompositionMode: Painter not active
        QWidget::paintEngine: Should no longer be called
        QPainter::begin: Paint device returned engine == 0, type: 1
        QPainter::pen: Painter not active
        QPainter::setPen: Painter not active
        QPainter::setPen: Painter not active
        QWidget::paintEngine: Should no longer be called
        QPainter::begin: Paint device returned engine == 0, type: 1
        QPainter::pen: Painter not active
        QPainter::setPen: Painter not active
        QPainter::setPen: Painter not active
        QPainter::setCompositionMode: Painter not active
        QPainter::setCompositionMode: Painter not active
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Looking at the code it seems that 8 bit does not have a QImage format associated to it hence the error you see.

          You may have to modify the QPA plugin.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Meyton_GmbH 0
            wrote on last edited by
            #5

            So Qt5 does not support 8bit color depth out of the box like Qtopia 4 anymore?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              The code looks pretty similar between both code bases.

              What was your configuration for Qtopia ? Where you using DirectFB ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Meyton_GmbH 0
                wrote on last edited by
                #7

                Before porting to Qt5 I was using Qtopia 4.7.5 with QWS.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  That does not give the information I requested.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Meyton_GmbH 0
                    wrote on last edited by Meyton_GmbH 0
                    #9

                    This was the QTopia 4.7.5 build configuration:

                    #!/bin/bash
                    
                    ./configure \
                    -embedded x86 \
                    -prefix /opt/qtopia-4.7.5_webkit \
                    -commercial \
                    -shared \
                    -no-largefile \
                    -exceptions \
                    -xmlpatterns \
                    -no-multimedia \
                    -no-audio-backend \
                    -no-phonon \
                    -no-phonon-backend \
                    -svg \
                    -webkit \
                    -javascript-jit \
                    -no-script \
                    -no-scripttools \
                    -no-declarative \
                    -no-mmx \
                    -no-3dnow \
                    -no-sse \
                    -no-sse2 \
                    -no-sse3 \
                    -no-ssse3 \
                    -no-sse4.1 \
                    -no-sse4.2 \
                    -no-avx \
                    -no-neon \
                    -qt-zlib \
                    -qt-gif \
                    -qt-libtiff \
                    -qt-libpng \
                    -qt-libmng \
                    -qt-libjpeg \
                    -qt-freetype \
                    -depths all \
                    -qt-decoration-windows \
                    -plugin-decoration-windows \
                    -no-opengl \
                    -qt-gfx-linuxfb \
                    -qt-gfx-qvfb \
                    -qt-kbd-tty \
                    -qt-kbd-qvfb \
                    -qt-mouse-pc \
                    -qt-mouse-qvfb \
                    -no-glib
                    

                    Framebuffer was QWS LinuxFB.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Do you need windowing support ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      M 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Do you need windowing support ?

                        M Offline
                        M Offline
                        Meyton_GmbH 0
                        wrote on last edited by
                        #11

                        @SGaist said in Qt5 linuxfb platform plugin does not work with 8bit color depth:

                        Do you need windowing support ?

                        Would be nice, but I could work around this if I can get the application running with 8bit color depth.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Then you should check wayland and see if it runs on your target at the depth you are looking for.

                          By the way, I see the commercial option. If you are a commercial user, you should contact the Qt Company support.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0

                          • Login

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