Tiger35
Tiger35

Reputation: 21

AutoRepeat Key down pressed on linuxFb doesn't work

I'm struggling with a platform issue. I have made a QML application displayed in a specific platform which is linuxFb. Inside my QML, I have a listView where can navigate key up and down. I have activated the keyNavigation; KeyNavigationEnabled: true.

Before integrating my app on the specific platform. I launch it on my Linux desktop with xcb platform. When I keep pressing the key down I can see the listView scrolling down, which is what I expect. But when I do the same things on linuxFb, it's not working, I just can see that it's moving only from the first to the second item in the list; so the autorepeat is not working.

Here is an example of my code:

Main.qml:

//Main.qml
import QtQuick
import QtQuick.Window

Window {
    width: 480
    height: 272
    visible: true
    title: qsTr("Hello World")

    Rectangle {
        width: 180
        height: 40

        Component {
            id: contactDelegate
            Item {
                width: 180
                height:40
                Column {
                  Text {text: '<b>Name:</b>' + name}
                  Text {text: '<b>Name:</b>' + number}
                }
            }
        }

       ListView {
           width: 180
           height: 200
           keyNavigationEnabled: true

           Component.OnCompleted: itemAtIndex(0).forceActiveFocus()

           model: ContactModel{}
           delegate: contactDelegate
           highlight: Rectangle {
               color: "lightsteelblue"
               radius: 5
           }
           focus: true

       }
    }

}

ContactModel.qml:

//ContactModel.qml
import QtQuick

ListModel {
    ListElement {
        name: "Bill Smith"
        number: "555 3264"
    }

    ListElement {
        name: "Bill Smith"
        number: "555 3264"
    }

    ListElement {
        name: "John Brown"
        number: "111 2222"
    }

    ListElement {
        name: "Sam Wise"
        number: "555 0473"
    }
    ListElement {
        name: "Eric Flag"
        number: "333 0473"
    }
    ListElement {
        name: "Max Van"
        number: "444 0473"
    }
}

Command line I used to launch it on linuxfb:
QT_QPA_FB_DISABLE_INPUT=1 QT_QPA_EVDEV_KEYBOARD_PARAMETERS=/dev/input/event7 QT_QPA_EVDEV_MOUSE_PARAMETERS=/dev/input/event7:nocompress:abs QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event7 QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0:size=480x272 QT_QPA_GENERIC_PLUGINS=evdevmouse,evdevkeyboard,evdevtouch QWS_MOUSE_PROTO=/dev/input/event7 ./myapp

Have you any idea how to fix this issue?

Upvotes: 2

Views: 61

Answers (0)

Related Questions