【Liunx_QT触摸屏不管用】

Liunx_QT触摸屏不管用

  • 1.添加环境变量
  • 2.运行程序
  • 3.报错
  • 4.说明

1.添加环境变量

vi /etc/profile

在这里插入图片描述

export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event1

同步环境变量或者重启
source /etc/profile

2.运行程序

./qt_test -platform linuxfb -plugin evdevtouch

3.报错

[root@imx6ull:/usr/bin]# ./01
qt.qpa.plugin: Could not find the Qt platform plugin “eglfs” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc.

Aborted

./qt_text -platform linuxfb

4.说明

开发板采用的是韦东山老师的imx6ull pro

QT交叉编译环境采用

fsl-imx-x11-glibc-x86_64-meta-toolchain-qt5-cortexa7hf-neon-toolchain-4.1.15-2.1.0.sh

同步资源指令如下

source /opt/fsl-imx-x11/4.1.15-2.1.0/environment-setup-cortexa7hf-neon-poky-linux-gnueabi

source /opt/st/stm32mp1/3.1-snapshot/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi

mount -t nfs -o nolock,vers=3 192.168.5.11:/home/book/nfs_rootfs /mnt/vmware

你可能感兴趣的:(QT,qt,开发语言)