mirror of https://gitlab.com/pamhyr/pamhyr2
Pamhyr: Disable native file dialog.
parent
e45eb3fd69
commit
50686e1b65
|
|
@ -912,7 +912,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
Nothing
|
Nothing
|
||||||
"""
|
"""
|
||||||
if self._study is None:
|
if self._study is None:
|
||||||
dialog = QFileDialog(self)
|
options = QFileDialog.Options()
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
dialog = QFileDialog(self, options=options)
|
||||||
dialog.setFileMode(QFileDialog.FileMode.ExistingFile)
|
dialog.setFileMode(QFileDialog.FileMode.ExistingFile)
|
||||||
dialog.setDefaultSuffix(".pamhyr")
|
dialog.setDefaultSuffix(".pamhyr")
|
||||||
# dialog.setFilter(dialog.filter() | QtCore.QDir.Hidden)
|
# dialog.setFilter(dialog.filter() | QtCore.QDir.Hidden)
|
||||||
|
|
@ -1304,7 +1307,11 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
if self._study.filename == "":
|
if self._study.filename == "":
|
||||||
return
|
return
|
||||||
|
|
||||||
dialog = QFileDialog(self)
|
options = QFileDialog.Options()
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
dialog = QFileDialog(self, options=options)
|
||||||
|
|
||||||
dialog.setFileMode(QFileDialog.FileMode.ExistingFile)
|
dialog.setFileMode(QFileDialog.FileMode.ExistingFile)
|
||||||
dialog.setDefaultSuffix(".BIN")
|
dialog.setDefaultSuffix(".BIN")
|
||||||
# dialog.setFilter(dialog.filter() | QtCore.QDir.Hidden)
|
# dialog.setFilter(dialog.filter() | QtCore.QDir.Hidden)
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,10 @@ class WindowToolKit(object):
|
||||||
Returns:
|
Returns:
|
||||||
The returns of callback
|
The returns of callback
|
||||||
"""
|
"""
|
||||||
dialog = QFileDialog(self)
|
options = QFileDialog.Options()
|
||||||
|
options |= QFileDialog.DontUseNativeDialog
|
||||||
|
|
||||||
|
dialog = QFileDialog(self, options=options)
|
||||||
|
|
||||||
if select_file:
|
if select_file:
|
||||||
mode = QFileDialog.FileMode.ExistingFile
|
mode = QFileDialog.FileMode.ExistingFile
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue