# mini display with OpenGL support to run Qt gui applications

I am developing a Qt gui application to run on my RPi2 board. I followed the instructions at RaspberryPI BeginnersGuide to crosscompile Qt. The requirement is to run the application on a mini (2.8" preferably) display. I tried to run my app on the Adafruit PiTFT - 2.8" Touchscreen Display. But it fails with the following error:

./myApp: error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory

From this link, I found out that pitft does not support openGL. Since Qt5 on RPi uses OpenGL for rendering, does it mean that I cannot run any of the Qt GUI applications on this display? If so, is this case true for any display with an interface other than hdmi/composite? or is my understanding wrong?

Can somebody please suggest me a mini display on which I can run my Qt gui apps?

• Qt has no idea about your GPIO display. You will need the raspi2fb program to copy the first frambuffer to your GPIO display in real-time. – flakeshake Jan 3 '16 at 11:21
• looks like you're missing libaries? Anyway i always run my qt app on rpi + pitftf with argumens --platform linuxfb=/dev/fb1 and i have not problems – JosiP Feb 5 '17 at 0:55

You may be following an out of date tutorial and installing screen software which is no longer relevant.

Support for at least some Adafruit 2.8" touchscreen displays is built in to the later versions of Raspbian with a recent kernel.

Mine contains

Name:   pitft28-resistive
Info:   Adafruit PiTFT 2.8" resistive touch screen
Params: speed                    Display SPI bus speed
rotate                   Display rotation {0,90,180,270}
debug                    Debug output level {0-7}


So add the following to /boot/config.txt and reboot.

dtoverlay=pitft28-resistive

sudo rpi-update if your kernel is not recent enough.

• /boot/overlays/README contains pitft28-resistive. dtoverlay=pitft28-resistive is added in /boot/config.txt. but still the problem exists. – roronoa zoro Sep 3 '15 at 11:15
• @roronoazoro Are you saying that the display does not show anything? – joan Sep 3 '15 at 11:35
• no. the display works fine. I'm facing problem only while running Qt gui applications. – roronoa zoro Sep 3 '15 at 12:04
• In that case I did not understand the question. Perhaps you could rephrase as "Since RPi uses OpenGL for rendering, does it mean that I cannot run any of the Qt GUI applications on this display?" is misleading as the RPi is rendering your display. So in your own terms OpenGL is working. – joan Sep 3 '15 at 12:19
• sorry for the confusion. I have edited my question. Is there a workaround for this problem? – roronoa zoro Sep 3 '15 at 12:34