diff options
Diffstat (limited to 'src/quick/doc/snippets')
-rw-r--r-- | src/quick/doc/snippets/qml/tableview/selectionmodel.qml | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/quick/doc/snippets/qml/tableview/selectionmodel.qml b/src/quick/doc/snippets/qml/tableview/selectionmodel.qml index b971e89979..8d7cb05f1c 100644 --- a/src/quick/doc/snippets/qml/tableview/selectionmodel.qml +++ b/src/quick/doc/snippets/qml/tableview/selectionmodel.qml @@ -62,17 +62,10 @@ Window { visible: true visibility: Window.AutomaticVisibility - Button { - id: button - text: "Toggle" - onClicked: tableView.selectionModel.select(tableView.model.index(0, 0), ItemSelectionModel.Toggle) - } - //![0] TableView { id: tableView anchors.fill: parent - anchors.topMargin: button.height clip: true model: TableModel { @@ -87,8 +80,10 @@ Window { delegate: Rectangle { implicitWidth: 100 implicitHeight: 30 + color: selected ? "blue" : "lightgray" + required property bool selected - color: selected ? "green" : "lightgray" + Text { text: display } } } |