Trying to get keyboard input in Qt 5.6



  • Hello, I am developing an embedded application (Qt Quick 2.0 application) to Raspberry Pi 2 and after browsing through the documentation, mainly
    http://doc.qt.io/qt-5/embedded-linux.html
    https://doc-snapshots.qt.io/qt5-5.6/embedded-linux.html
    I still haven't been able to have (USB) keyboard input to my application.
    This is what I have tried so far:
    I tried to set QT_QPA_EVDEV_KEYBOARD_PARAMETERS to LinuxInput:/dev/input/event0 in Qt Creator's Run Environment options. (the /dev/input/event0 is the only /eventX inside that folder, beside it there is this /mice also)
    Then I tried to set it in my .bashrc on the Pi.
    After realized I am using Qt 5.6 and I have no idea whether or not I have libinput (I assume not), I return and set
    QT_QPA_EVDEV_KEYBOARD_PARAMETERS = LinuxInput:/dev/input/event0 and
    QT_QPA_EGLFS_NO_LIBINPUT = 1 in the Run Environment again and still no keyboard input. I have checked and the input on the keyboard still affects the terminal behind the application.

    Please help me on how to get the keyboard input to the application and also block it from affecting the terminal.



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