Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /randovania_randovania /randovania /gui /lib /wait_dialog.py
| from __future__ import annotations | |
| from typing import TYPE_CHECKING | |
| from PySide6 import QtWidgets | |
| from randovania.gui.lib import common_qt_lib | |
| if TYPE_CHECKING: | |
| import asyncio | |
| async def cancellable_wait[T](parent: QtWidgets.QWidget | None, task: asyncio.Task[T], title: str, message: str) -> T: | |
| message_box = QtWidgets.QMessageBox( | |
| QtWidgets.QMessageBox.Icon.NoIcon, | |
| title, | |
| message, | |
| QtWidgets.QMessageBox.StandardButton.Cancel, | |
| parent, | |
| ) | |
| common_qt_lib.set_default_window_icon(message_box) | |
| message_box.rejected.connect(task.cancel) | |
| message_box.show() | |
| try: | |
| return await task | |
| finally: | |
| message_box.close() | |
Xet Storage Details
- Size:
- 697 Bytes
- Xet hash:
- c19a234a0de092dfc32acaf79871f50720e494a196d09aa96482a8ade46be692
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.