T507设备中运行qml编写的程序,提示module未安装,如下图。
这是因为程序运行时未找到QML库导致的,需要在qtenv.sh文件或者系统环境变量中导出QML库在嵌入式设备文件系统中的位置,修改后如下:
1 export QML2_IMPORT_PATH=$QT_ROOT/qml
qtenv.sh文件完整内容如下:
1 export QTDIR=/usr/local/Qt_5.12.5 2 if [ -d $QTDIR ];then 3 4 #source /dbusrun.sh 5 #dbus-uuidgen > /etc/machine-id 6 #export DBUS_SESSION_BUS_ADDRESS=`cat /tmp/dbusaddr` 7 8 export QT_ROOT=$QTDIR 9 export PATH=$QTDIR/bin:$PATH 10 export LD_LIBRARY_PATH=$QTDIR/lib:/usr/lib/cedarx/:$LD_LIBRARY_PATH 11 12 export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins 13 export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0 14 export QT_QPA_FONTDIR=$QT_ROOT/fonts 15 export QML2_IMPORT_PATH=$QT_ROOT/qml 16 17 #export LD_PRELOAD=/usr/lib/libts.so 18 #/usr/lib/preloadable_libiconv.so: 19 20 TouchDevice=ilitek_ts 21 for InputDevices in /sys/class/input/input* 22 do 23 DeviceName=`cat $InputDevices/name` 24 #echo $InputDevices name:$DeviceName 25 if [ $DeviceName == $TouchDevice ];then 26 TouchDeviceNum=${InputDevices##*input} 27 export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event$TouchDeviceNum 28 echo "add "/dev/input/event$TouchDeviceNum "to Qt Application." 29 break 30 fi 31 done 32 if [ ! -n "$TouchDeviceNum" ]; then 33 echo "Error:Input device $TouchDevice can not be found,plz check it!" 34 fi 35 36 export QT_QPA_PLATFORM=eglfs 37 #export QT_QPA_GENERIC_PLUGINS=tslib 38 export QT_QPA_GENERIC_PLUGINS=evdevtouch 39 export QT_QPA_EGLFS_INTEGRATION=eglfs_mali 40 #export QT_QPA_FB_HIDECURSOR=1 41 #export QT_QPA_EGLFS_HIDECURSOR=1 42 #export QT_QPA_EGLFS_ROTATION=90 43 44 export QWS_MOUSE_PROTO= 45 export DBUS_SESSION_BUS_ADDRESS=`cat /tmp/dbusaddr` 46 mkdir -p /dev/shm 47 ulimit -c unlimited 48 FRAMEBUFFER=/dev/fb0 ScreenDemo & 49 #FRAMEBUFFER=/dev/fb0 Launcher & 50 #FRAMEBUFFER=/dev/fb1 MediaUI & 51 echo "find qt5 installed done" 52 fi
标签:QT,QPA,module,T507,export,qml,PATH,dev From: https://www.cnblogs.com/oliudaneng/p/18128921