From ea4cc6a1a31c3bbee7ac7f56c5c633aa0caa90ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Mon, 27 Mar 2017 14:15:50 +0200 Subject: [PATCH] Implemented Qt4-dialogue box for input-file name. --- QtPyLoT.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 9e5b8928..25177d79 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -80,10 +80,14 @@ class MainWindow(QMainWindow): # check for default pylot.in-file infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in') if os.path.isfile(infile)== False: - infile = raw_input("Default file not found! Type name including full path ...") - self.infile = infile + infile = QInputDialog.getText(self, "Default input file not found! \ + Enter file name including full path:", + "infile") + self.infile = infile[0] + else: + self.infile = infile - self._inputs = AutoPickParameter(infile) + self._inputs = AutoPickParameter(self.infile) if settings.value("user/FullName", None) is None: fulluser = QInputDialog.getText(self, "Enter Name:", "Full name") settings.setValue("user/FullName", fulluser)