Skip to content
Snippets Groups Projects
Unverified Commit 66c83be6 authored by inso's avatar inso Committed by GitHub
Browse files

Merge pull request #773 from vtexier/dev

Fix QAsyncFileDialog crash on some platform #620
parents fa4b469d 96537c10
Branches
No related tags found
No related merge requests found
import sys
from PyQt5.QtWidgets import QMessageBox, QFileDialog
import asyncio
......@@ -13,6 +14,8 @@ class QAsyncFileDialog:
@staticmethod
async def get_save_filename(parent, title, url, filtr):
dialog = QFileDialog(parent, title, url, filtr)
# Fix linux crash if not native QFileDialog is async...
if sys.platform != 'linux':
dialog.setOption(QFileDialog.DontUseNativeDialog, True)
dialog.setAcceptMode(QFileDialog.AcceptSave)
result = await dialog_async_exec(dialog)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment