1.打开配置文件
root@ELF1:~# vi /etc/X11/xorg.conf
2.添加如下标红内容
Section "Device"
Identifier "Kernel Framebuffer Device"
Driver "fbdev"
Option "fbdev" "/dev/fb0"
Option "Rotate" "UD" //显示旋转 180°
EndSection
Section "ServerFlags"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection
Section "InputClass"
Identifier "calibration"
MatchProduct "goodix-ts" //设置当前触摸设备
MatchDevicePath "/dev/input/event*" //设备节点
Option "InvertY" "1" //翻转 Y 轴
Option "InvertX" "1" //翻转 X 轴
EndSection
效果如下:
![](https://i-blog.csdnimg.cn/blog_migrate/54c08c02ec2f86f1d2fde3bddb85a02a.png)
3.断电,连接屏幕,上电,等待系统启动完成,此时可以看到qt界面已经翻转180度。
效果图如下:
![](https://i-blog.csdnimg.cn/blog_migrate/e2b8b8c94386370b50d2838ddb671c5a.jpeg)
![](https://i-blog.csdnimg.cn/blog_migrate/a12d4deda4dc0640649b07d73efd9760.jpeg)