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. Qt for Rpi2 and GUI on LCD instead of HDMI

Qt for Rpi2 and GUI on LCD instead of HDMI

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 2.8k Views 2 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.
  • paavo91P Offline
    paavo91P Offline
    paavo91
    wrote on last edited by paavo91
    #1

    Hi everyone!
    I cross compiled Qt for Rpi2, I can now run app from PC on raspberry but it always shows on HDMI output, not on my LCD connected by SPI. Here is specs of my LCD http://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)

    I am beginner in Qt and Linux but I suppose problem is in configuration. Because I can only run app usin eglfs by default but my LCD using framebuffer fb1.

    Is it possible to change output destination from hdmi to my LCD? I think it could be done by set QT_QPA_PLATFORM variable but I have no idea how to do that.

    When I run app with -platform linuxfb:fb=/dev/fb1 it looks like on video:
    VIDEO

    Thanks

    1 Reply Last reply
    0
    • sneubertS Offline
      sneubertS Offline
      sneubert
      wrote on last edited by sneubert
      #2

      Hi paavo91,

      with the nature of the bcm you can not set the eglfs platform plugin to use a different display than the hdmi out. LinuxFB can´t use the hardware acceleration.
      One workaround we used is to run a deamon to copy the framebuffer of hdmi out to a spi lcd like in https://github.com/tasanakorn/rpi-fbcp.
      This is working on a rpi2 with abut 10% processor time and also with redirecting the touch Input from the lcd to the application.

      paavo91P 1 Reply Last reply
      0
      • sneubertS sneubert

        Hi paavo91,

        with the nature of the bcm you can not set the eglfs platform plugin to use a different display than the hdmi out. LinuxFB can´t use the hardware acceleration.
        One workaround we used is to run a deamon to copy the framebuffer of hdmi out to a spi lcd like in https://github.com/tasanakorn/rpi-fbcp.
        This is working on a rpi2 with abut 10% processor time and also with redirecting the touch Input from the lcd to the application.

        paavo91P Offline
        paavo91P Offline
        paavo91
        wrote on last edited by
        #3

        @sneubert so I cant display simple GUI without OpenGL and other features just on my LCD?

        1 Reply Last reply
        0
        • sneubertS Offline
          sneubertS Offline
          sneubert
          wrote on last edited by
          #4

          I did not try more than a simple QWidget with some labes and buttons and linuxFB, but this was working. In your video I can see the wastebasket. Is there a xserver running on fb1?

          paavo91P 1 Reply Last reply
          0
          • sneubertS sneubert

            I did not try more than a simple QWidget with some labes and buttons and linuxFB, but this was working. In your video I can see the wastebasket. Is there a xserver running on fb1?

            paavo91P Offline
            paavo91P Offline
            paavo91
            wrote on last edited by
            #5

            @sneubert I dont know how to check it :( Only think I know I configured this LCD to use fb1 (in file /usr/share/X11/xorg.conf.d/99-fbturbo.conf)

            I used this tutorial http://www.jarzebski.pl/blog/2015/06/19/jak-ozenic-wyswietlacze-waveshare-z-raspberry-pi-2.html

            1 Reply Last reply
            0
            • sneubertS Offline
              sneubertS Offline
              sneubert
              wrote on last edited by
              #6

              ok, i can´t read the text but in this tutuorial the xserver is started with /etc/rc.local so delete the line su -l pi -c startx from there and reboot. seems like xserver and your application are both writing to fb1, that´s why your Video shows this result.

              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