- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 PyQt5做一个抽奖程序
import sys;from PyQt5.QtWidgets import QApplication,QWidget,QPushButton,QLineEdit;from random import choices;from PyQt5.QtCore import QTimer;zist = ['GAN','魔域','奇艺','RUBIK','魅龙','圣手','百变魔王','旋风小子','得力','晨光','小米计客'] class Window(QWidget): def __init__(self
2021-05-10 19:21:40 449
原创 PyQt5入门教程(1)Hello, World!
PyQt是一个创建GUI应用程序的工具包。它是Python编程语言和Qt库的成功融合。Qt库是目前最强大的库之一。PyQt是由Phil Thompson 开发。 之所以会将PyQt称作PyQt5,是因为PyQt的最新版本是5开头的,所以称作PyQt5。 安装PyQt5 pip install PyQt5 -i https://pypi.douban.com/simple pip install PyQy5-tools -i https://pypi.douban.com/simple 第一个PyQt
2021-05-04 09:15:00 209
原创 在PyQt5上氵贴
import sys from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QPushButton,QInputDialogclass Window(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.btn = QPushButton(self) self.btn.setText('签到') self.btn.re
2021-04-06 15:46:22 111
原创 PyQt5蟒蛇计算器V2
上一个计算器实在是太粗糙了,本次更新的内容有: 美观的界面 退格的实现 添加了括号 根号的实现 正式的名称与版本号 import sys from math import sqrt from PyQt5.QtWidgets import QApplication,QWidget,QPushButton,QLineEdit,QLabel class Window(QWidget): def __init__(self): super().__init__() self.initUI() de
2021-04-05 21:38:02 112
原创 PyQt5实现简易计算器
import sys from PyQt5.QtWidgets import * class Window(QWidget): def __init__(self): super().__init__() self.initUI() def initUI(self): self.let = QLineEdit(self) self.let.move(0,0) self.let.resize(1000,500) self.btn1 = QPushButton(self) se
2021-03-27 15:22:49 202 2
原创 求助
from fractions import Fraction a=input('')#设这里输入3 print(Fraction(1,a)) 报错:TypeError: both arguments should be Rational instances 有没有大佬知道解决方法?
2021-02-15 11:54:59 329 1
原创 Python画奥林匹克环
废话不多说直接上代码,希望大佬能够改进并精简 import turtle as t#导入海龟库 t.shape('turtle')#海龟皮肤t.colormode(255)#颜色模式RGB模式t.pencolor((239,169,13))#笔颜色黄色t.pensize(16)#笔粗16t.speed(10)#速度10t.pu()#抬笔t.goto(-115,-100)#移动笔到坐标系-115,-100t.pd()#放下笔t.circle(100)#画半径100的圆t.pencolor((5,147,65)
2021-02-06 18:15:42 409
原创 Python做到指绘
Python做到指绘 源码是从网上Pygame教程找的,不是自己写的,原帖连接http://www.kidscode.cn/article/detail/id/9202.html 出于个人心理问题原因,把注释删了,像我一样的萌新可以看原帖理解。 用手机的Pydroid3!用电脑你的心态会爆炸! 源码需要配合一张图片,这张图片是一个白点,负责当笔,图片需要命名为"point.png"。 源码: mouse_image_filename = ‘point.png’ import pygamefrom pygam
2021-02-02 19:08:13 120 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人