filter possible event format file extension for selection from file dialog

This commit is contained in:
Sebastian Wehling-Benatelli 2014-12-17 06:30:03 +01:00
parent 3c9865c767
commit 0749420f9a

View File

@ -139,7 +139,11 @@ class MainWindow(QMainWindow):
action = self.sender() action = self.sender()
if isinstance(action, QAction): if isinstance(action, QAction):
if action.data() is None: 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: else:
fname = unicode(action.data().toString()) fname = unicode(action.data().toString())
if not self.okToContinue(): if not self.okToContinue():