25 Star 240 Fork 44

lazytech / scr2txt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
donate.py 815 Bytes
一键复制 编辑 原始数据 按行查看 历史
ld 提交于 2020-11-01 16:30 . v1版本提交
import io
import base64
from PIL import Image,ImageQt
from PyQt5 import QtGui
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog,QLabel,QHBoxLayout
from donate_qr import img as qr_png
class MyQrWidget(QDialog):
def __init__(self):
super().__init__()
self.setWindowFlags(
Qt.WindowCloseButtonHint
)
self.setWindowTitle(u"感谢您的帮助!")
self.hbox = QHBoxLayout (self)
pil_img = Image.open(io.BytesIO(base64.b64decode(qr_png)))
pp = ImageQt.toqpixmap(pil_img)
label = QLabel()
label.setPixmap(QtGui.QPixmap(pp))
label.setScaledContents(True)
self.hbox.addWidget(label)
def closeEvent(self, event):
event.ignore() # 忽略关闭事件
self.hide() # 隐藏窗体
Python
1
https://gitee.com/lazytech_group/scr2txt.git
git@gitee.com:lazytech_group/scr2txt.git
lazytech_group
scr2txt
scr2txt
master

搜索帮助