Commit e4fa10bc authored by Michael Büsch's avatar Michael Büsch

gui: Fix open/save dialog for PyQt4

Signed-off-by: Michael Büsch's avatarMichael Buesch <[email protected]>
parent 1831de73
......@@ -173,7 +173,11 @@ class MainWidget(QWidget):
return True
def load(self):
fn, fil = QFileDialog.getOpenFileName(self,
if isPyQt and isQt4:
getOpenFileName = QFileDialog.getOpenFileNameAndFilter
getOpenFileName = QFileDialog.getOpenFileName
fn, fil = getOpenFileName(self,
"Open project", "",
"Awlsim project or AWL/STL source (*.awlpro *.awl);;"
"Awlsim project (*.awlpro);;"
......@@ -200,7 +204,11 @@ class MainWidget(QWidget):
def save(self, newFile=False):
if newFile or not self.filename:
fn, fil = QFileDialog.getSaveFileName(self,
if isPyQt and isQt4:
getSaveFileName = QFileDialog.getSaveFileNameAndFilter
getSaveFileName = QFileDialog.getSaveFileName
fn, fil = getSaveFileName(self,
"Awlsim project save as", "",
"Awlsim project (*.awlpro)",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment