1

I am currently working an a project with raspberry pi 4 and I need to display a GUI using PyQt5 The problem is the Raspbian OS lite doesn't have desktop (I installed it to optimize the resources ), and I need to display the GUI on a 5 inch HDMI display screen

1

2 Answers 2

2

You could also try and run the Qt5 application through the frame buffer, instead of through a windowing system. I have been happily running my application this way. It skips the requirement of a desktop environment and windowing system, which makes it boot faster and also feels more embedded. See: https://doc.qt.io/qt-5/embedded-linux.html

Without a windowing system, you would only be able to show one window at a time. Which usually is not a big problem in embedded situations, although keep this in mind if you need to show more than one window at the same time for your application.

You'll have to make sure that the EGLFS or linuxfb plugins for Qt5 are in your compilation of Qt5.

You can then run your custom Qt5 application with the -platform argument. I start my PyQt5 application with a bash script as follows: python3 main.py -platform linuxfb

Hope this helps.

0

If you need QT for your app you will need to run X11 or wayland. You don’t have to run a full desktop and you can run X with limited resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.