Skip to content

Commit

Permalink
修复单独拖拽文件不运行bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mikko-mikust committed Dec 17, 2023
1 parent 31fb295 commit 23b704d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@


def fu_k(e):
# print(e.mimeData().text())
ans = []
print(e.mimeData().text())
ans = ''
for aa in e.mimeData().text().split('\n'):
if aa != '':
ans.append(aa[8:])
ans += aa[8:] + ','

fun_bind.files = ans
fun_bind.a3.start()


m_ui.hash_w.dropEvent = fu_k
Expand Down
2 changes: 2 additions & 0 deletions ui/fun_bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def hash_col():
if (not files) or files == '':
return
for bb in files.split(sep=','):
if bb == '':
continue
try:

cc = QFile(bb)
Expand Down
2 changes: 1 addition & 1 deletion ui/main_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(800, 600)
MainWindow.resize(1300, 700)
f = QFont()
f.setPointSize(11)
self.centralwidget = QWidget(MainWindow)
Expand Down

0 comments on commit 23b704d

Please sign in to comment.