Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Unable to get the keyboard and mouse pointer in QT application
Servers for Qt installer are currently down

Unable to get the keyboard and mouse pointer in QT application

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 3 Posters 3.3k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    T4QT
    wrote on 17 Dec 2014, 15:25 last edited by
    #1

    HI,
    I have successfully cross compiled QT-5.3.2 for my ARM board and then I have deploy all the QT libraries on to the board. Now I am trying to run the QT application after setting the environment variables like

    export QT_QPA_FONTDIR=/opt/qt/lib/fonts
    export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/qt/plugins/platforms
    export LD_LIBRARY_PATH=/opt/qt/lib
    export QT_QPA_ENABLE_TERMINAL_KEYBOARD=1

    I am also supplying the platform and plugin parameters as below:

    qtapplication -platform linuxfb:fb=/dev/fb3 -plugin evdevmouse -plugin evdevkeyboard

    but I don't see the mouse or keyboard.

    On my bootlogs I can see both usb (keyboard and mouse) got detected but its QT application which doesn't detect keyboard and mouse.

    Regards

    1 Reply Last reply
    0
    • T Offline
      T Offline
      T4QT
      wrote on 30 Dec 2014, 19:22 last edited by
      #2

      solved now.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 30 Dec 2014, 23:07 last edited by
        #3

        What was the problem ?

        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
        0
        • S Offline
          S Offline
          Suhanko
          wrote on 2 Jan 2015, 15:34 last edited by
          #4

          Hello, everyone!
          I have the same problem, but my system is x86_64. I ran my app in my system (static kernel and initrd only, using all binaries from My Desktop system). In my notebook my app runs fine, but when running over my system, I can see neither mouse nor keyboard.

          I'm trying my system over a virtual machine.

          I can get events in /dev/input/event6 (to mouse) and /dev/input/event0 (to my keyboard). I tried this one using cat:
          cat /dev/input/event6
          And moving the mouse I can see the events.

          I tried redirect QT_DEBUG_PLUGINS to a log file, but the results is a binary file!
          I did the same in my notebook and I can see the log correctly.

          Since the app locks the screen, I can't back to console and this way is impossible to see anything generate by app.

          Do you have some tip for me?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Suhanko
            wrote on 2 Jan 2015, 15:52 last edited by
            #5

            Sorry, I forgot to show my parameters.
            I tried without pass device path, the last I tried as below:

            export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0,tty=/dev/tty1
            export QT_QPA_EVDEV_KEYBOARD_PARAMETERS=grab=1
            export QT_QPA_GENERIC_PLUGINS=evdevkeyboard:/dev/input/event0,evdevmouse:/dev/input/event6

            ANd now, I tried some parameters more:
            export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/qt/plugins/platforms
            export QT_QPA_ENABLE_TERMINAL_KEYBOARD=1

            Unfortunately, I have no ideas for now.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 2 Jan 2015, 22:24 last edited by
              #6

              To see what might be happening you should connect to your device through SSH and then start the application, this way you should be able to see if you have any error message.

              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
              0
              • S Offline
                S Offline
                Suhanko
                wrote on 3 Jan 2015, 01:34 last edited by
                #7

                Hello!
                Thank you to answer!
                My system doesn't have a ssh, but you gave me a idea. I wrote a QTimer with a single shot to 5 seconds closing my application.

                I did a redirect from stdout to file, but stdout isn't writing nothing.

                Then I did a redirect from stderr to file and I saw the a structure from application loading the module correctly. I couldn't see errors in debuging mode. I wrote a shortcut to close my app with Ctrl+Q, but my keyboard is not working too.

                I'm not sure, but the terminal could be the problem. I will see this one a bit more.
                Thank you again!

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  T4QT
                  wrote on 5 Jan 2015, 14:55 last edited by
                  #8

                  I needed to add one more line in my parameters:

                  export QT_PLUGIN_PATH=/opt/qt/plugins along with
                  export QT_QPA_PLATFORM_PLUGIN_PATH=/opt/qt/plugins/platform

                  and it worked with out any error.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved