随笔分类 -  Python 合集

摘要:演示: 代码 import sys from PyQt5 import QtWidgets, QtCore, QtGui from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * class 阅读全文
posted @ 2021-06-10 16:33 博客zhu虎康 阅读(2669) 评论(0) 推荐(0)
摘要:演示: 代码: # 显示控件提示消息 import sys from PyQt5.QtWidgets import QHBoxLayout,QMainWindow,QApplication,QToolTip,QPushButton,QWidget from PyQt5.QtGui import QF 阅读全文
posted @ 2021-06-09 17:59 博客zhu虎康 阅读(147) 评论(0) 推荐(0)
摘要:演示: 代码 import sys from PyQt5.QtWidgets import QHBoxLayout,QMainWindow,QApplication,QPushButton,QWidget class QuitApplication(QMainWindow): def __init_ 阅读全文
posted @ 2021-06-09 16:04 博客zhu虎康 阅读(629) 评论(0) 推荐(0)
摘要:# QDesktopWidget import sys from PyQt5.QtWidgets import QDesktopWidget,QMainWindow,QApplication from PyQt5.QtGui import QIcon class CenterForm(QMainWi 阅读全文
posted @ 2021-06-09 14:47 博客zhu虎康 阅读(953) 评论(0) 推荐(0)
摘要:演示 代码 import sys from PyQt5.QtWidgets import QMainWindow,QApplication from PyQt5.QtGui import QIcon class FirstMainWin(QMainWindow): def __init__(self 阅读全文
posted @ 2021-06-09 14:42 博客zhu虎康 阅读(142) 评论(0) 推荐(0)
摘要:演示 代码 from PyQt5.QtWidgets import * import sys class pushButton(QWidget): def __init__(self): super(pushButton,self).__init__() # 对方法进行调用 self.initUI( 阅读全文
posted @ 2021-06-09 11:36 博客zhu虎康 阅读(2166) 评论(0) 推荐(1)
摘要:演示效果 附源码 import sys from PyQt5.QtWidgets import QWidget, QMessageBox, QApplication class Example(QWidget): def __init__(self): super().__init__() self 阅读全文
posted @ 2021-06-05 09:09 博客zhu虎康 阅读(423) 评论(0) 推荐(1)
摘要:预览效果 源码 # -*- coding: utf-8 -*- ''' 【简介】 PyQt5中QRadio例子 ''' import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets impor 阅读全文
posted @ 2021-06-04 16:51 博客zhu虎康 阅读(477) 评论(0) 推荐(0)
摘要:PyQt5实践——《做一个天气预报的查询》 第一步: 设计界面,我们这里直接用Qtdesign设计。 为了大家比较容易设置,我们这里在把对象查看器中的内容贴出来 简单的几个组件:一个窗口+两个按钮+一个下拉是的盒子+一个标签+一个返回文本显示的内容 第二步:将ui文件转换为py文件 将demo.ui 阅读全文
posted @ 2021-06-04 13:35 博客zhu虎康 阅读(736) 评论(0) 推荐(1)
摘要:做一个时间拖动器 演示: 源码: #coding:utf-8 import sys from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QWidget, QLCDNumber, QSlider, QVBoxLayout, QApplica 阅读全文
posted @ 2021-06-04 13:32 博客zhu虎康 阅读(137) 评论(0) 推荐(0)
摘要:import sys from PyQt5 import QtCore from PyQt5.QtCore import * from PyQt5.QtGui import QPainter, QColor from PyQt5.QtWidgets import * class myQWidget( 阅读全文
posted @ 2021-06-02 11:37 博客zhu虎康 阅读(386) 评论(0) 推荐(2)
摘要:实现效果 代码 from tkinter import * import requests LOG_LINE_NUM = 0 class MY_GUI(): def __init__(self, init_window_name): self.init_window_name = init_wind 阅读全文
posted @ 2021-05-25 20:11 博客zhu虎康 阅读(352) 评论(0) 推荐(0)
摘要:实现效果如下图所示 附原码 使用爬虫实现 import requests city = {'北京': '101010100', '济南': '101120101', '青岛': '101120201', '淄博': '101120301', '烟台': '101120501', '潍坊': '101 阅读全文
posted @ 2021-05-25 20:08 博客zhu虎康 阅读(392) 评论(0) 推荐(0)