tslib vs. evdevtouch



  • I have a problem getting my very simple Qt test app working with an eGalax touchscreen.

    I am able to see & use the device via evtest.

    root@petalinux:/tmp# evtest
    No device specified, trying to scan all of /dev/input/event*
    Available devices:
    /dev/input/event0:      eGalax Inc. USB TouchController Pen
    /dev/input/event1:      eGalax Inc. USB TouchController
    Select the device event number [0-1]: 
    root@petalinux:/tmp#
    

    Yet, when I start my app I get no touch events..

    Here is what the debug output from my Qt test app show. It has been edited for brevity.

    
    root@petalinux:/tmp#
    root@petalinux:/tmp#
    root@petalinux:/tmp#
    root@petalinux:/tmp#
    root@petalinux:/tmp#
    root@petalinux:/tmp# /tmp/qt-test-app
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqlinuxfb.so"
    Found metadata in lib /usr/lib/plugins/platforms/libqlinuxfb.so, metadata=
    
    <stuff deleted>
    
    Got keys from plugin meta data ("linuxfb")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqminimal.so"
    Found metadata in lib /usr/lib/plugins/platforms/libqminimal.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 329219
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/platforms/libqoffscreen.so"
    Found metadata in lib /usr/lib/plugins/platforms/libqoffscreen.so, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 329219
    }
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/var/volatile/tmp" ...
    loaded library "/usr/lib/plugins/platforms/libqlinuxfb.so"
    qt.qpa.input: evdevtouch: Adding device at "/dev/input/event1"
    qt.qpa.input: evdevtouch: Using device /dev/input/event1
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms/generic" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/generic" ...
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/generic/libqevdevkeyboardplugin.so"
    Found metadata in lib /usr/lib/plugins/generic/libqevdevkeyboardplugin.so, metadata=
    {
        "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
        "MetaData": {
            "Keys": [
                "EvdevKeyboard"
            ]
        },
        "className": "QEvdevKeyboardPlugin",
        "debug": false,
        "version": 329219
    }
    
    
    Got keys from plugin meta data ("evdevkeyboard")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/generic/libqevdevmouseplugin.so"
    Found metadata in lib /usr/lib/plugins/generic/libqevdevmouseplugin.so, metadata=
    {
        "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
        "MetaData": {
            "Keys": [
                "EvdevMouse"
            ]
        },
        "className": "QEvdevMousePlugin",
        "debug": false,
        "version": 329219
    }
    
    
    Got keys from plugin meta data ("evdevmouse")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/generic/libqevdevtabletplugin.so"
    Found metadata in lib /usr/lib/plugins/generic/libqevdevtabletplugin.so, metadata=
    {
        "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
        "MetaData": {
            "Keys": [
                "EvdevTablet"
            ]
        },
        "className": "QEvdevTabletPlugin",
        "debug": false,
        "version": 329219
    }
    
    
    Got keys from plugin meta data ("evdevtablet")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/generic/libqevdevtouchplugin.so"
    Found metadata in lib /usr/lib/plugins/generic/libqevdevtouchplugin.so, metadata=
    {
        "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
        "MetaData": {
            "Keys": [
                "EvdevTouch"
            ]
        },
        "className": "QEvdevTouchScreenPlugin",
        "debug": false,
        "version": 329219
    }
    
    
    Got keys from plugin meta data ("evdevtouch")
    QFactoryLoader::QFactoryLoader() looking at "/usr/lib/plugins/generic/libqtuiotouchplugin.so"
    Found metadata in lib /usr/lib/plugins/generic/libqtuiotouchplugin.so, metadata=
    {
        "IID": "org.qt-project.Qt.QGenericPluginFactoryInterface",
        "MetaData": {
            "Keys": [
                "TuioTouch"
            ]
        },
        "className": "QTuioTouchPlugin",
        "debug": false,
        "version": 329219
    }
    
    
    Got keys from plugin meta data ("tuiotouch")
    QFactoryLoader::QFactoryLoader() checking directory path "/var/volatile/tmp/generic" 
     ...
    loaded library "/usr/lib/plugins/generic/libqevdevtouchplugin.so"
    qt.qpa.input: evdevtouch: Adding device at "/dev/input/event1"
    qt.qpa.input: evdevtouch: Using device /dev/input/event1
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/platforms/styles" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/plugins/styles" ...
    QFactoryLoader::QFactoryLoader() checking directory path "/var/volatile/tmp/styles" ...
    qt.qpa.input: evdevtouch: /dev/input/event1: Protocol type B  (multi)
    qt.qpa.input: evdevtouch: /dev/input/event1: min X: 0 max X: 4095
    qt.qpa.input: evdevtouch: /dev/input/event1: min Y: 0 max Y: 4095
    qt.qpa.input: evdevtouch: /dev/input/event1: min pressure: 0 max pressure: 0
    qt.qpa.input: evdevtouch: /dev/input/event1: device name: eGalax Inc. USB TouchController
    qt.qpa.input: evdevtouch: /dev/input/event1: Protocol type B  (multi)
    qt.qpa.input: evdevtouch: /dev/input/event1: min X: 0 max X: 4095
    qt.qpa.input: evdevtouch: /dev/input/event1: min Y: 0 max Y: 4095
    qt.qpa.input: evdevtouch: /dev/input/event1: min pressure: 0 max pressure: 0
    qt.qpa.input: evdevtouch: /dev/input/event1: device name: eGalax Inc. USB TouchController
    QPainter::begin(), device=0x2d5e0, type=3
    QPainter::end()
    QPainter::begin(), device=0x2d5e0, type=3
    QPainter::end()
    QPainter::begin(), device=0x2d5e0, type=3
    QPainter::setPen(), color=ffffffff
    
    <bunch of Qt drawing primitives deleted>
    
    QPainter::setPen(), color=ff000000, (brushStyle=1) style=1, cap=16, join=64
    QPainter::end()
    QPainter::begin(), device=0x254d0, type=3
    QPainter::begin(), device=0x26938, type=3
    qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1  touch devices, 0 pending handler(s)
    qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1  touch devices, 0 pending handler(s)
    QPainter::begin(), device=0x2d5e0, type=3
    QPainter::end()
    QPainter::begin(), device=0x2d5e0, type=3
    QPainter::end()
    QPainter::begin(), device=0x2d5e0, type=3
    QPainter::setPen(), color=ffffffff
    QPainter::drawPolyline(), count=3
    QPainter::setPen(), color=ff767472
    QPainter::drawPolyline(), count=3
    
    <bunch of Qt drawing primitives deleted>
    
    QPainter::setBrush(), color=ff101418, style=5
    QPainter::setBrushOrigin(), (3.00,3.00)
    QPainter::drawRects(), count=1
    QPainter::drawRects(), count=1
    QPainter::drawRects(), count=1
    QPainter::drawRects(), count=1
    QPainter::restore()
    QPainter::end()
    ^C
    root@petalinux:/tmp#
    
    

    Any ideas/suggestions are most appreciated.

    Also, is tslib preferred over evdev for Qt use? If so, why is that?

    Thanks.

    -brad w.


  • Lifetime Qt Champion

    Hi,

    Might be a silly question but are you sure that the plugin is using the right input device ?



  • @SGaist

    Not a silly question at all..

    But, I'm not sure how to check without grokking through the code..

    Suggestions are appreciated.



  • @BradWalker

    Turned out my solution was to add the following options to the app when executing..

    -platform linuxfb -plugin evdevtouch
    

    All is finally good in my embedded Qt world.. 8-)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.