• 大小: 39KB
    文件类型: .py
    金币: 1
    下载: 0 次
    发布日期: 2021-06-14
  • 语言: Python
  • 标签: Pyqt5  

资源简介

利用Pyqt5实现了基本的口算题和时间功能。 具体实现步骤见我的博客链接: http://blog.csdn.net/qq_32747775/article/details/79264482

资源截图

代码片段和文件信息

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file ‘kousuan_kaidi.ui‘
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore QtGui QtWidgets
from PyQt5.QtWidgets import QMessageBox
import time
import random
import docx


class Ui_Form(object):
    def setupUi(self Form):
        Form.setobjectName(“Form“)
        Form.resize(1000 750)
        self.label = QtWidgets.QLabel(Form)
        self.label.setGeometry(QtCore.QRect(300 0 360 100))
        font = QtGui.QFont()
        font.setFamily(“Adobe Devanagari“)
        font.setPointSize(24)
        font.setBold(True)
        font.setItalic(False)
        font.setWeight(75)

        self.time1 = time.time()
        self.time2 = time.time()
        self.timer_result = QtCore.QTimer()
        self.file = docx.Document()
        self.fuhao=[0000000000]
        self.xuhao1=[87691026 27 28 29 30]
        self.xuhao2=[141312111536 37 38 39 40]
        self.xuhao3 = [17 16 19 18 2041 42 4344 45]
        self.xuhao4=[43251678910]
        self.result=[0000000000]
        self.xuhao1_num=[0000000000]
        self.xuhao3_num = [0 0 0 0 0 0 0 0 0 0]
        self.result_label=[0 0 0 0 0 0 0 0 0 0]


        self.label.setFont(font)
        self.label.setobjectName(“label“)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setGeometry(QtCore.QRect(810 90 100 15))
        self.label_2.setobjectName(“label_2“)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setGeometry(QtCore.QRect(760 90 100 15))
        self.label_3.setobjectName(“label_3“)
        self.label_4 = QtWidgets.QLabel(Form)
        self.label_4.setGeometry(QtCore.QRect(760 120 100 15))
        self.label_4.setobjectName(“label_4“)
        self.label_5 = QtWidgets.QLabel(Form)
        self.label_5.setGeometry(QtCore.QRect(810 120 100 15))
        self.label_5.setobjectName(“label_5“)
        self.pushButton = QtWidgets.QPushButton(Form)
        self.pushButton.setGeometry(QtCore.QRect(770 160 111 41))
        self.pushButton.setobjectName(“pushButton“)
        self.verticalLayoutWidget = QtWidgets.QWidget(Form)
        self.verticalLayoutWidget.setGeometry(QtCore.QRect(150 220 51 361))
        self.verticalLayoutWidget.setobjectName(“verticalLayoutWidget“)
        self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
        self.verticalLayout.setContentsMargins(0 0 0 0)
        self.verticalLayout.setobjectName(“verticalLayout“)
        self.label_8 = QtWidgets.QLabel(self.verticalLayoutWidget)
        font = QtGui.QFont()
        font.setFamily(“Adobe Caslon Pro Bold“)
        font.setPointSize(14)
        font.setBold(True)
        font.setUnderline(False)
        font.setWeight(75)
        font.setStrikeOut(False)
    

评论

共有 条评论