1 Star 3 Fork 0

AiYa艾雅/深度学习数据污染检测

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
progress.py 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
AiYa艾雅 提交于 3年前 . 主分支
import time
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QWidget, QProgressBar
from PyQt5.QtGui import QPalette, QPixmap, QBrush
import sys
from PyQt5.QtCore import Qt
class qpgb(QWidget):
def __init__(self):
super(qpgb, self).__init__()
self.initUI()
self.resize(1240, 732)
self.initUI()
palette = QPalette()
pix = QPixmap("background.jpg")
pix = pix.scaled(1920, 1080)
palette.setBrush(QPalette.Background, QBrush(pix))
self.setPalette(palette)
self.setAutoFillBackground(True)
def initUI(self):
# 构建一个进度条
l1 = QtWidgets.QLabel(self)
l1.setText("检测进度")
font = QtGui.QFont()
font.setFamily('微软雅黑')
font.setBold(True)
l1.setFont(font)
l1.setStyleSheet("QWidget{font:40pt}")
# l1.move(120,120)
l1.resize(1240, 200)
l1.setAlignment(Qt.AlignCenter)
self.pbar = QProgressBar(self)
# 从左上角30-50的界面,显示一个200*25的界面
self.pbar.setFixedSize(1000, 50) # 设置进度条的位置
self.pbar.setAlignment(Qt.AlignCenter)
self.pbar.move(120, 500)
# 设置开始按钮
self.pv = 0
self.pbar.setMinimum(0)
self.pbar.setMaximum(100)
self.pbar.setValue(self.pv)
if __name__ == '__main__':
# 创建一个Qt应用对象
app = QApplication(sys.argv)
myqt = qpgb()
myqt.show()
for i in range(101):
myqt.pbar.setValue(i)
time.sleep(0.01)
QApplication.processEvents() # 实时显示
if (i == 100):
sys.exit(app.exec_())
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/aiya-aiya/Deep-learning-data-pollution-detection.git
git@gitee.com:aiya-aiya/Deep-learning-data-pollution-detection.git
aiya-aiya
Deep-learning-data-pollution-detection
深度学习数据污染检测
master

搜索帮助