Merge pull request #11190 from druiz17/fix-table-dialog

Fixed unable to select items in a TreeView
This commit is contained in:
Seth Alves 2017-08-14 17:05:42 -07:00 committed by GitHub
commit 21cef482a5

View file

@ -27,6 +27,7 @@ TreeView {
model: treeModel
selection: ItemSelectionModel {
id: selectionModel
model: treeModel
}
@ -215,6 +216,10 @@ TreeView {
onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
onClicked: {
selectionModel.setCurrentIndex(index, ItemSelectionModel.ClearAndSelect);
}
onActivated: {
var path = scriptsModel.data(index, 0x100)
if (path) {