import QtQuick 2.5 import fbx.application 1.0 Application { color: "black" ListModel { id: liste ListElement { txtgrid: "texte numéro 1" } ListElement { txtgrid: "deux" } ListElement { txtgrid: "Bonsoir" } ListElement { txtgrid: "Texte un peu long" } ListElement { txtgrid: "Bonjour" } ListElement { txtgrid: "Je suis un texte beaucoup trop long" } ListElement { txtgrid: "un" } ListElement { txtgrid: "essai" } } GridView { id: grille width: parent.width/2 height: parent.height/2 focus: true anchors.centerIn: parent cellWidth: 80 cellHeight: 80 highlight: Rectangle {color : "red"} model: liste delegate: Column{ Text { text: txtgrid; anchors.horizontalCenter: parent.horizontalCenter; color: "white" } } } Text{ color: "white" font.pixelSize: 20 anchors.bottomMargin: 20 anchors.centerIn: parent text: "L'élément séléctionné est en position " + grille.currentIndex } }