mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Pamhyr: Disable native file dialog.
This commit is contained in:
1 parent
e45eb3fd69
commit
50686e1b65
2 files changed
+13
-3
No files matched your search
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user