Qt for Rpi2 and GUI on LCD instead of HDMI
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:
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.
@sneubert so I cant display simple GUI without OpenGL and other features just on my LCD?
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?
@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)
ok, i can´t read the text but in this tutuorial the xserver is started with
/etc/rc.localso delete the line
su -l pi -c startxfrom there and reboot. seems like xserver and your application are both writing to fb1, that´s why your Video shows this result.