今天闲来无事,用python写了一个抽奖程序
pyqt版本:pyqt5
python版本:3.6.6
下面直接上代码,有建议的话,欢迎大家交流评论!
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Lucky_draw.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import (QMainWindow, QApplication,QLabel,QLineEdit,QMessageBox,QComboBox)
from PyQt5.QtCore import Qt, QSize
from PyQt5.QtCore import Qt, QThread, pyqtSignal
import sys
import random
import time
tester = ["发", "我", "人", "他", "去", "个", "给", "如", "吃", "分"]
class Ui_Lucky_draw(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(658, 526)
self.horizontalLayoutWidget = QtWidgets.QWidget(Dialog)
self.horizontalLayoutWidget.setGeometry(QtCore.QRect(9, 9, 641, 401))
self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget)
self.horizontalLayout.setContentsMargins(0,