Qt5.x移植后的环境配置
环境配置脚本如下
#!/bin/sh export QTDIR=/usr/lib/qt5 export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins export QT_QPA_PLATFORM=eglfs:fb=/dev/fb0 export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event1 export QT_QPAFONTDIR=/usr/lib/fonts export QML2_IMPORT_PATH=$QTDIR/qml export LD_LIBRARY_PATH=/usr/lib:/lib:$LD_LIBRARY_PATH export PATH=/bin:/usr/bin:/usr/bin/qt5:$PATH
说明
!/bin/sh
export QTDIR=Qt5安装在开发板的路径
插件路径
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins
显示终端配置
export QT_QPA_PLATFORM=eglfs:fb=/dev/fb0
不设置此项的话,启动需要添加:./analogclock -platform linuxfb
触摸配置
export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event1
字体库配置
export QT_QPAFONTDIR=/usr/lib/fonts
qml配置
export QML2_IMPORT_PATH=$QTDIR/qml
qt库路径配置
export LD_LIBRARY_PATH=/usr/lib:/lib:$LD_LIBRARY_PATH
qt命令路径配置
export PATH=/bin:/usr/bin:/usr/bin/qt5:$PATH