新增复制功能

This commit is contained in:
gfdgd xi 2023-04-15 19:35:17 +08:00
parent df96b2fd7f
commit 9f61096967
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ Certainty: possible
Check: binaries Check: binaries
Type: binary, udeb Type: binary, udeb
Priority: optional Priority: optional
Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo, python3-pyperclip
Recommends: winbind, wimtools, python3-pyqt5.qtwebengine, qemu-user, binfmt-support, qemu-user-static Recommends: winbind, wimtools, python3-pyqt5.qtwebengine, qemu-user, binfmt-support, qemu-user-static
Section: utils Section: utils
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner

View File

@ -14,6 +14,7 @@ import os
import sys import sys
import time import time
import json import json
import pyperclip
import random import random
import base64 import base64
import shutil import shutil
@ -1880,7 +1881,10 @@ class ValueCheck():
if file == "": if file == "":
return return
try: try:
QtWidgets.QInputDialog.getText(window, "", "计算得到的值", QtWidgets.QLineEdit.Normal, self.link[types](self, file)) value = self.link[types](self, file)
if QtWidgets.QInputDialog.getText(window, "", "下面是计算得到的值,<b>是否要复制到剪切板?</b>", QtWidgets.QLineEdit.Normal, value)[1]:
pyperclip.copy(value)
QtWidgets.QMessageBox.information(window, "提示", "复制成功!")
except: except:
traceback.print_exc() traceback.print_exc()
QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc())