Qt 5.8.0 embedded, LinuxFB, integrate mouse
-
I have an ARM board with embedded linux and Qt5.8.0 with linuxfb. I'm using the following script to run the QtQuick2 app:
export QML2_IMPORT_PATH=/usr/lib/qt/qml export QT_QPA_FONTDIR=/usr/lib/fonts export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0 export QT_QPA_EGLFS_DEBUG=1 export QT_QPA_EGLFS_NO_LIBINPUT=1 export QT_QPA_FB_HIDECURSOR=0 export QT_LOGGING_RULES=qt.qpa.input=true ./qmlplot -platform linuxfb -plugin tslib:/dev/input/mice
I also has Qt4.8.6 on that target board and I was able to integrate mouse with the following script:
export GCONV_PATH=/lib/gconv export TSLIB_TSDEVICE=/dev/input/mice export TSLIB_FBDEVICE=/dev/fb0 export QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mice export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_PLUGINDIR=/usr/lib/ts export TSLIB_CONSOLEDEVICE=none export TSLIB_CALIBFILE=/etc/pointercal /var/bacs/data/gui -qws -display linuxfb:/dev/fb0
I'm not able to use mouse with the first script and Qt5, however it's possible with qt4.8.6 with the provided script.
I suggest that the key difference in the "QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mice", to be more specific, I believe that "IntelliMouse" describes protocol that input device (e.g. mouse) implementing. I've tried to pass this parameter in Qt5 script by different approaches, but so far it doesn't helped.Does anyone knows equivalent for "QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mice" in Qt5?
-
Rebuilding Qt5 with evdev helps me to solve the problem. Here are the running script exactly:
export QML2_IMPORT_PATH=/usr/lib/qt/qml export QT_QPA_FONTDIR=/usr/lib/fonts export QT_PLUGIN_PATH=/usr/lib/qt/plugins export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0 export QT_QPA_EGLFS_DEBUG=1 export QT_QPA_EGLFS_NO_LIBINPUT=1 export QT_QPA_FB_HIDECURSOR=0 export QT_QPA_EVDEV_MOUSE_PARAMETERS=/dev/input/event0:grab export QT_LOGGING_RULES=qt.qpa.input=true /var/bacs/data/qmlplot/qmlplot
'export QT_QPA_EVDEV_MOUSE_PARAMETERS=/dev/input/event0:grab' solves the issue with mouse.
Tinkering on Qt5 source code didn't let me find QWS_PROTO analog in QPA. -
Because QWS is Qt 4 only.