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.11: reconfigure framebuffer
QtWS25 Last Chance

Qt5.11: reconfigure framebuffer

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
7 Posts 2 Posters 2.5k Views
  • 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.
  • D Offline
    D Offline
    debian
    wrote on 3 Jul 2018, 14:14 last edited by
    #1

    Hello!
    I port application from Qt-4.7.3 to Qt-5.11.0, application work on board with ARM CPU and support several resolutions of user interface, e.g. 1920x1080 and 720x576.
    For correct output user interface I must configure framebuffer, with Qt-4.7.3 I use QScreen::setMode(width, height, bpp), unfortunately I can't found same function in Qt-5.11.0.
    Qt5 have API for reconfigure framebuffer or I should use ioctl or fbset?
    How should I inform Qt about framebuffer config after I change it via ioctl?
    Thank you and excuse my bad English.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Cleiton Bueno
      wrote on 3 Jul 2018, 14:25 last edited by
      #2

      Are you using EGLFS or any server graphic as X11 or Wayland?
      Is your project being ported to QtQuick or Widgets?
      Look at this link has several information about resolutions Qt For Embedded Linux


      Cleiton Bueno

      Blog | Linkedin | B2Open

      1 Reply Last reply
      1
      • D Offline
        D Offline
        debian
        wrote on 3 Jul 2018, 14:47 last edited by
        #3

        Hello @Cleiton-Bueno and thank you for your answer!
        At this moment we use linuxfb because this application work on several SoC which haven't GPU.
        I read this page and linked pages but not found answer.

        C 1 Reply Last reply 3 Jul 2018, 15:30
        0
        • D debian
          3 Jul 2018, 14:47

          Hello @Cleiton-Bueno and thank you for your answer!
          At this moment we use linuxfb because this application work on several SoC which haven't GPU.
          I read this page and linked pages but not found answer.

          C Offline
          C Offline
          Cleiton Bueno
          wrote on 3 Jul 2018, 15:30 last edited by
          #4

          @debian Ok, I understand. Passing via cmdline does not work?

          ./your_app -platform linuxfb:fb=/dev/fb0:size=720x576

          D 1 Reply Last reply 3 Jul 2018, 18:17
          1
          • C Cleiton Bueno
            3 Jul 2018, 15:30

            @debian Ok, I understand. Passing via cmdline does not work?

            ./your_app -platform linuxfb:fb=/dev/fb0:size=720x576

            D Offline
            D Offline
            debian
            wrote on 3 Jul 2018, 18:17 last edited by
            #5

            @Cleiton-Bueno I can use fbset for configure framebuffer but this is not very good choice because:

            • need parse config before runnong app
            • have additional util in rootfs, rootfs size is very important for embedded
            • can't change UI resolution without restart app
            C 1 Reply Last reply 3 Jul 2018, 18:55
            0
            • D debian
              3 Jul 2018, 18:17

              @Cleiton-Bueno I can use fbset for configure framebuffer but this is not very good choice because:

              • need parse config before runnong app
              • have additional util in rootfs, rootfs size is very important for embedded
              • can't change UI resolution without restart app
              C Offline
              C Offline
              Cleiton Bueno
              wrote on 3 Jul 2018, 18:55 last edited by
              #6

              @debian But the line I passed you is not using fbset, it's own QPA linuxFB statement.

              Have you entered the link I passed in the LinuxFB part?
              https://doc.qt.io/qt-5/embedded-linux.html#linuxfb

              If you are using the same hardware as Qt4.8 to use Qt5.11, optimize it a lot and remove the unnecessary, because if you include a fbset it is worrying about the space that this upgrade is worrisome.


              Cleiton Bueno

              Blog | Linkedin | B2Open

              1 Reply Last reply
              1
              • C Offline
                C Offline
                Cleiton Bueno
                wrote on 3 Jul 2018, 19:35 last edited by
                #7

                To try to help, Qt4 to Qt5 QScreen() has undergone some changes and some attributes of QScreen() you access through QGuiApplication().
                https://www.ics.com/blog/whats-new-qt-5-qscreen-class

                Accessing some QScreen() properties through QGUiApplication().

                    QGuiApplication app(argc, argv);
                    foreach(QScreen *screen, app.screens()) {
                        qDebug().noquote() << "Name             : " << screen->name();
                        qDebug().noquote() << "DevicePixelRatio : " << screen->devicePixelRatio();
                        qDebug().noquote() << "Width            : " << screen->geometry().width();
                        qDebug().noquote() << "Height           : " << screen->geometry().height();
                        qDebug().noquote() << "Size             : " << screen->geometry().size();
                    }
                

                Maybe altering geometry will help you with what you want?

                screen->geometry().setWidth(800);
                screen->geometry().setHeight(600);
                

                See the new QScreen() methods and which one can help you, such as grabWindow().

                QScreen Qt4.8
                QScreen Qt5.11

                Now I want fb underneath I see no other way without being fbset and restarting application.

                Good luck.

                1 Reply Last reply
                1

                6/7

                3 Jul 2018, 18:55

                • Login

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