Important: Please read the Qt Code of Conduct -

Solution for detecting mouse hotplug on QT App area

  • I'm finding the solution how to detect the hot-plug event on mouse device on QT application using tslib.

    I used below environment variables and it works if I connect the both device touch and mouse before the qt app executed.

    export QT_QPA_EGLFS_TSLIB="1"
    export TSLIB_TSDEVICE="/dev/input/event1" // Touch dev
    export QT_QPA_EVDEV_MOUSE_PARAMETERS="/dev/input/event4:grab" // Mouse dev

    But after then, QT app doesn't recognize the mouse hot plug event.

    I figured out the "QEvdevMouseManager" does not add the the call-back for "QDeviceDiscovery::deviceDetected" if I specify the variable "QT_QPA_EVDEV_MOUSE_PARAMETERS".

    I wonder how to make it work without the modification or patch for the qtbase(qevdevmousemanager.cpp).
    Someone have any idea?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of Qt are you using ?
    On what device ?

  • @SGaist
    I'm using QT version 5.10.1 and imx6q yocto bsp.

  • Lifetime Qt Champion

    I am not sure whether both TSLIB and EVDEV can be used at the same time. Does it work if you only use EVDEV ?

Log in to reply