Raspberry Pi Qt5 Set physical screen size

后端 未结 2 884
鱼传尺愫
鱼传尺愫 2021-01-18 12:50

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

2条回答
  •  既然无缘
    2021-01-18 13:04

    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).

提交回复
热议问题