select on right click:
This selects when right clicking if there is no selection or when there is only one other selected item
This commit is contained in:
parent
3caf04494c
commit
01a5ada683
1 changed files with 5 additions and 1 deletions
|
@ -317,8 +317,12 @@ ColumnLayout {
|
|||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.RightButton)
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
if(selectionModel.selectedIndexes.length <= 1)
|
||||
selectionModel.select(proxyModel.idx(index),
|
||||
ItemSelectionModel.ClearAndSelect);
|
||||
rightClickMenu.popup()
|
||||
}
|
||||
else if ((mouse.button === Qt.LeftButton) &&
|
||||
(mouse.modifiers === Qt.ShiftModifier)) {
|
||||
if (libraryList.currentIndex < index) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue