Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Qt 5.8.0 embedded, LinuxFB, integrate mouse

    Installation and Deployment
    embedded linux qt5.8.0 mouse
    2
    4
    4934
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Mosolov last edited by Mosolov

      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?

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        You can find more information about the input devices here.

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • M
          Mosolov last edited by Mosolov

          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.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Because QWS is Qt 4 only.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • First post
              Last post