dev: 支持清空数据库
This commit is contained in:
11
src/utils.py
Normal file
11
src/utils.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# coding: utf8
|
||||
from PySide6 import QtWidgets
|
||||
|
||||
|
||||
def accept_warning(widget: QtWidgets.QWidget, condition: bool,
|
||||
caption: str = "Warning", text: str = "Are you sure to continue?") -> bool:
|
||||
if condition:
|
||||
b = QtWidgets.QMessageBox.question(widget, caption, text)
|
||||
if b == QtWidgets.QMessageBox.StandardButton.No:
|
||||
return True
|
||||
return False
|
||||
Reference in New Issue
Block a user