![](https://img-blog.csdnimg.cn/20210913163511218.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
PyQt5
python3
是大嘟嘟呀
人生如梦,易蹉跎
展开
-
PyQt5 - 加入线程
代码# -*- coding: utf-8 -*-import randomimport sysimport threadingimport timefrom PyQt5.QtGui import *from PyQt5.QtWidgets import *now = lambda: time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))titles: str = "Python2 Python3 Java Go原创 2021-09-15 09:50:28 · 2134 阅读 · 0 评论 -
PyQt5 - 猜数字小游戏2
代码# !/usr/bin/python3# coding = utf-8import osimport sysfrom PyQt5.QtWidgets import *from PyQt5.QtGui import *from random import randintclass Window(QWidget): def __init__(self): super().__init__() self.set_attr() # ==> 设原创 2021-09-15 09:48:47 · 2089 阅读 · 0 评论 -
PyQt5 - 文件拖拽显示路径
代码import sysfrom PyQt5.QtWidgets import *from PyQt5.QtGui import *class Window(QMainWindow): def __init__(self): super(Window, self).__init__() self.paths = "" self.setWindowTitle('文件拖入') # ==> 窗口标题 self.resize原创 2021-09-13 16:26:19 · 4864 阅读 · 5 评论 -
PyQt5 - 猜数字小游戏
代码# -*- coding: utf-8 -*-# Time :2021/9/11 17:20# !/usr/bin/python3# coding = utf-8import sysfrom PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QMessageBox, QLineEditfrom PyQt5.QtGui import QIconfrom random import randintcl原创 2021-09-11 18:04:51 · 2178 阅读 · 0 评论 -
PyQt5 - 随机移动按钮位置
代码# -*- coding: utf-8 -*-# Time :2021/9/9 15:49''' 4个按钮'''import sysimport randomfrom PyQt5.QtWidgets import QApplication, QPushButton, QWidgetfrom PyQt5.QtGui import QIconbtns = []# 随机某个按钮 随机移动 到某个位置def when_btn_onclick(): prin原创 2021-09-11 11:25:37 · 2734 阅读 · 0 评论 -
PyQt5 - 多选框
代码# -*- coding: utf-8 -*-# Time :2021/9/10 17:47import sysimport timefrom PyQt5.QtWidgets import *from PyQt5.QtCore import *from PyQt5.QtGui import *select_opts = [] # ==> 记录 用户勾选的 选项all_opts = [] # ==> 窗口中所有的可选选项class Window(Q原创 2021-09-11 11:22:48 · 3536 阅读 · 0 评论