Skip to content

Commit

Permalink
Merge pull request #22025 from procitec/fix_explorer_dragndrop
Browse files Browse the repository at this point in the history
PR: Improve drag & drop out of file explorer plugin
  • Loading branch information
ccordoba12 committed Apr 29, 2024
2 parents 362fa24 + 47a1877 commit de7935b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spyder/plugins/explorer/widgets/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,12 @@ def dragMoveEvent(self, event):
def startDrag(self, dropActions):
"""Reimplement Qt Method - handle drag event"""
data = QMimeData()
data.setUrls([QUrl(fname) for fname in self.get_selected_filenames()])
data.setUrls(
[
QUrl.fromLocalFile(fname)
for fname in self.get_selected_filenames()
]
)
drag = QDrag(self)
drag.setMimeData(data)
drag.exec_()
Expand Down

0 comments on commit de7935b

Please sign in to comment.