树莓派4 QT5模块的编译安装
1、QT5和Qtcreator的安装,安装完后,应该编程菜单出现 Qt Creator
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install qt5-default
sudo apt-get install qtcreator
sudo apt install qtbase5-private-dev------private/qobject_p.h-------
2、QT5模块的安装
sudo apt-get install libqt5* 为对应模块
libqt5chart libqt5script*
3、固定IP,树莓派4请编辑 /etc/dhcpcd.conf
4、不黑屏
sudo vi /etc/lightdm/lightdm.conf
找到[SeatDefaults]段下的’xserver-command’,取消注释,修改为如下:
#xserver-command=X
修改为
xserver-command=X -s 0 -dpms
-s # –设置屏幕保护不启用
dpms 关闭电源节能管理
5、竖屏
修改/boot/config.txt文件
文件末尾添加
lcd_rotate=0 // 触摸屏(不能有空格)
display_rotate=0 // HDMI外接显示屏(不能有空格)
编辑/usr/share/X11/xorg.conf.d/
sudo nano 40-libinput.conf
找到touchscreen section
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
添加一行 Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
结果为
Section "InputClass"
Identifier "libinput touchscreen catchall"
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection