I am developping a qt5 application on my raspberry pi on raspbian using cross compilation.
When I run it, I get a black screen trying display a Pop-up which is a QFra
Raspberry Pi 3 Kernel 4.14.27-v7+
Qt 5.10.1 cross-compiled from Ubuntu 16.04 host
I had to add the following to my .profile on my Rpi
Open .profile
sudo nano ~/.profile
I added these lines at end
# physical display properties
export QT_QPA_EGLFS_PHYSICAL_WIDTH=520
export QT_QPA_EGLFS_PHYSICAL_HEIGHT=326
Then reload bash profile with (or reboot)
source .profile
The following link has descriptions for all the EGLFS environment variables:
http://doc.qt.io/qt-5/embedded-linux.html
I just put something like
export QT_QPA_EGLFS_PHYSICAL_WIDTH=myWidth
QT_QPA_EGLFS_PHYSICAL_HEIGHT=myHeight
QT_QPA_EGLFS_DEPTH=myDepth
in my .bashrc to get rid of those errors. Also the physical width and height are in millimeters not pixels, and screen depth is color depth of your display (18 in my case).