aboutsummaryrefslogtreecommitdiffstats
path: root/DemoApplication/controls/CNItemDelegate.qml
blob: d938644fc73a30541ad7fa0a14a57fdd2931f392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import QtQuick 2.9
import QtQuick.Controls 2.4
import CursorNavigation 1.0

ItemDelegate {
    CursorNavigation.acceptsCursor: true
    CNCursorIndicator { cursorItem : parent }

    //here we make sure the list's current index follows the cursor!
    CursorNavigation.onHasCursorChanged: {
        if (CursorNavigation.hasCursor) {
            parent.currentIndex = index;
        }
    }
}