From 0749420f9aaa9e94700e329565f307da1c2c0ebd Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 17 Dec 2014 06:30:03 +0100 Subject: [PATCH] filter possible event format file extension for selection from file dialog --- QtPyLoT.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 1855e491..83cd356b 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -139,7 +139,11 @@ class MainWindow(QMainWindow): action = self.sender() if isinstance(action, QAction): if action.data() is None: - fname = QFileDialog() + filt = """Supported event formats (*.mat *.qml *.xml *.kor + *.evt)""" + caption = 'Select event to open' + fname = QFileDialog().getOpenFileName(self, caption=caption, + filter=filt) else: fname = unicode(action.data().toString()) if not self.okToContinue():