Skip to content

Commit

Permalink
qml: provide auto scroll functionality to KeyNavigableTableView
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzun authored and robUx4 committed Aug 3, 2024
1 parent e77ed3e commit b852ff2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/gui/qt/widgets/qml/KeyNavigableTableView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ FocusScope {
tableDelegate.forceActiveFocus(focusReason)
}

onContainsDragChanged: view.updateItemContainsDrag(this, containsDrag)

Connections {
target: selectionModel

Expand Down
4 changes: 4 additions & 0 deletions modules/gui/qt/widgets/qml/TableViewDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ T.Control {
required property bool acceptDrop

readonly property bool dragActive: dragHandler.active
property alias containsDrag: dropArea.containsDrag
property alias drag: dropArea.drag

required property real fixedColumnWidth
required property real weightedColumnWidth
Expand Down Expand Up @@ -281,6 +283,8 @@ T.Control {
}

DropArea {
id: dropArea

enabled: delegate.acceptDrop

anchors.fill: parent
Expand Down

0 comments on commit b852ff2

Please sign in to comment.