Skip to content

Commit

Permalink
add drag/drop support
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodCoder666 committed Aug 23, 2022
1 parent 115c2ef commit 7ab1559
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
from ui_MainWindow import Ui_MainWindow

# Version info
VERSION = '1.0.1'
VERSION = '1.1.0'
CHANNEL = 'stable'
BUILD_DATE = '2022-07-01'
BUILD_DATE = '2022-08-23'
FULL_VERSION = f'{VERSION}-{CHANNEL} ({BUILD_DATE}) on {sys.platform}'

app = QApplication(sys.argv)
Expand Down Expand Up @@ -200,6 +200,9 @@ def closeEvent(self, event):
else:
event.ignore()

def dragEnterEvent(self, event):
event.accept()

def dropEvent(self, event):
self.__openFile(event.mimeData().text()[8:]) # [8:] is to get rid of 'file:///'

Expand Down

0 comments on commit 7ab1559

Please sign in to comment.