Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a Qt GUI application run on a framebuffer in Linux

I am developing a GUI in Qt. The target platform is Linux / ARMv6-based Raspberry Pi Zero W and distribution is a custom Poky / Yocto distribution. I attached a display module (ILI9341-based 2.4" SPI TFT Display) to the Raspberry Pi and I would like my Qt application to run on the framebuffer /dev/fb1 provided by a display driver.

The current framebuffer driver allows me to display the desktop in the display module, i.e:

FRAMEBUFFER=/dev/fb1 startx

The previous command achieves what I would like to do indirectly. However, I do not want to show my desktop. I just want to specify a framebuffer as a displaying platform for a Qt application (instead of using DISPLAY environment variable)

Any guidance as to how this would be achieved by using either command line arguments to the executable, or via application code, or by using both approaches is highly appreciated.

like image 694
mozcelikors Avatar asked Oct 17 '25 18:10

mozcelikors


1 Answers

Running Qt directly on the framebuffer is described here.

In short, you would use the linuxfb driver for Qt that will interface you with the /dev/fbX available on your system.

Some more info is also available here.

like image 98
emmrk Avatar answered Oct 20 '25 09:10

emmrk