Skip to content

Commit

Permalink
Pyside6: fix drag and drop from guide manager #409
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcampos committed Feb 7, 2025
1 parent f3d2e30 commit 2c55d19
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion release/scripts/mgear/core/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,10 @@ def mouseMoveEvent(self, event):
drag = QtGui.QDrag(self)
drag.setMimeData(mimeData)
drag.setHotSpot(event.pos())
dropAction = drag.start(QtCore.Qt.MoveAction)
try:
dropAction = drag.start(QtCore.Qt.MoveAction) # PySide2
except AttributeError:
dropAction = drag.exec(QtCore.Qt.MoveAction) # PySide6
if not dropAction == QtCore.Qt.MoveAction:
pos = QtGui.QCursor.pos()
widget = QtWidgets.QApplication.widgetAt(pos)
Expand Down

0 comments on commit 2c55d19

Please sign in to comment.