From baec745ee7471eef6e41831093fbe9d4ada188cd Mon Sep 17 00:00:00 2001 From: Winston Weinert Date: Sun, 9 Mar 2014 23:53:11 -0500 Subject: [PATCH] Convert QUrl to local path. GUI works on Windows now. --- sc2bank/gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sc2bank/gui.py b/sc2bank/gui.py index e4a7cfa..13a2842 100755 --- a/sc2bank/gui.py +++ b/sc2bank/gui.py @@ -229,7 +229,8 @@ def droppedSC2Bank(self, mimeData=None): if len(urls) > 1: raise NotImplemented('Can only handle one file at once.') - fname = str(urls[0].path()) + # http://stackoverflow.com/a/8580720/2720026 + fname = str(urls[0].toLocalFile().toLocal8Bit().data()) self.model = Model(fname) self.reflectModel()