Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.8
-
None
-
-
65c306244 (dev), 9ccfe296f (6.8)
Description
When implementing the delegate for HorizontalHeaderView and using a MouseArea to fill the delegate for managing the mouse events, sometimes the Drag&Drop of the column will be activated even when the event is accepted by the MouseArea.
Reproduce:
- Set the mouse.accepted = false, for example when using the Alt modifier
- Try to drag the column and drop it to another place (using Alt modifier).
- Set the mouse.accepted = true, for example when the Alt modifier is not pressed.
- Try to drag the column and drop it to another place (using no modifiers).
Expected:
The Drag&Drop for the column should not work as the mouse is accepted
Observed:
The column is able to be moved to another place.
Snippet:
HorizontalHeaderView { syncView: tableView movableColumns: true delegate: Rectangle { Label { anchors.centerIn: parent text: model.columnName } MouseArea { anchors.fill: parent onPressed: function(event) { if (event.modifiers === Qt.AltModifier) { event.accepted = false return } } } } }