合集-PyQt5

摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class WindowPattern(QMainWindow): def __init__(self, *ar 阅读全文
posted @ 2024-06-09 16:03 星空28 阅读(19) 评论(0) 推荐(0) 编辑
摘要:设置窗口控件风格 QApplication.setStyle(...) 窗口可以显示三种风格:['windowsvista', 'Windows', 'Fusion'] import sys from PyQt5.QtCore import * from PyQt5.QtGui import * f 阅读全文
posted @ 2024-06-09 15:03 星空28 阅读(50) 评论(0) 推荐(0) 编辑
摘要:方法一:不使用信号与槽 MultiWin.py文件 """ 多窗口交互--不使用信号与槽 """ import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from Da 阅读全文
posted @ 2024-06-08 17:04 星空28 阅读(60) 评论(0) 推荐(0) 编辑
摘要:from PyQt5.QtCore import * from PyQt5 import QtCore from PyQt5.QtWidgets import * import sys class OverrideSlot(QMainWindow): def __init__(self): supe 阅读全文
posted @ 2024-06-08 15:45 星空28 阅读(10) 评论(0) 推荐(0) 编辑
摘要:方法一:lambda表达式传递参数 from PyQt5.QtCore import * from PyQt5 import QtCore from PyQt5.QtWidgets import * import sys class LambdaSlotArg(QMainWindow): def _ 阅读全文
posted @ 2024-06-08 15:38 星空28 阅读(45) 评论(0) 推荐(0) 编辑
摘要:方法一: from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class AutoSignalSlot(QWidget): def __init__(self): super().__init__() self.se 阅读全文
posted @ 2024-06-08 13:31 星空28 阅读(21) 评论(0) 推荐(0) 编辑
摘要:import time from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class BackendThread(QThread): update_date = pyqtSignal(str) def run(se 阅读全文
posted @ 2024-06-08 12:30 星空28 阅读(14) 评论(0) 推荐(0) 编辑
摘要:from PyQt5.QtCore import * from PyQt5.QtWidgets import * import sys class WinSignal(QWidget): # 定义一个信号 button_clicked_signal = pyqtSignal() def __init 阅读全文
posted @ 2024-06-08 11:58 星空28 阅读(18) 评论(0) 推荐(0) 编辑
摘要:··· from PyQt5.QtCore import * class NNSignal(QObject): # 定义一个信号 signal1 = pyqtSignal() # 发送3个参数的信号 signal2 = pyqtSignal(int) signal3 = pyqtSignal() d 阅读全文
posted @ 2024-06-08 09:56 星空28 阅读(7) 评论(0) 推荐(0) 编辑
摘要:··· from PyQt5.QtCore import * class MultiSignal(QObject): # 定义一个信号 signal1 = pyqtSignal() # 发送3个参数的信号 signal2 = pyqtSignal(int) signal3 = pyqtSignal( 阅读全文
posted @ 2024-06-08 06:50 星空28 阅读(11) 评论(0) 推荐(0) 编辑
摘要:import os import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * if __name__ == '__main__': app = QApplication( 阅读全文
posted @ 2024-06-15 05:35 星空28 阅读(18) 评论(0) 推荐(0) 编辑
摘要:import os import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtWebEngineWidgets import * class W 阅读全文
posted @ 2024-06-14 17:20 星空28 阅读(29) 评论(0) 推荐(0) 编辑
摘要:""" 加载本地web页面 """ import os import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtWebEngineWidget 阅读全文
posted @ 2024-06-14 17:14 星空28 阅读(18) 评论(0) 推荐(0) 编辑
摘要:""" 用web浏览器控件QWebEngineView显示网页 PyQT5和Web交互技术 使用python和web混合开发 Python + JavaScript + HTML5 + CSS """ import sys from PyQt5.QtCore import * from PyQt5. 阅读全文
posted @ 2024-06-14 16:56 星空28 阅读(43) 评论(0) 推荐(0) 编辑
摘要:""" 动态显示当前时间 QTimer QThread """ from PyQt5.QtWidgets import QWidget, QMessageBox, QVBoxLayout, QPushButton, QLCDNumber, QApplication, QListWidget, QGr 阅读全文
posted @ 2024-06-14 16:48 星空28 阅读(14) 评论(0) 推荐(0) 编辑
摘要:""" 动态显示当前时间 QTimer QThread """ from PyQt5.QtWidgets import QWidget, QPushButton, QApplication, QListWidget, QGridLayout, QLabel from PyQt5.QtCore imp 阅读全文
posted @ 2024-06-14 15:06 星空28 阅读(20) 评论(0) 推荐(0) 编辑
摘要:QStackWidget堆栈窗口 from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * import sys class stackwidgetDemo(QTabWidget): def 阅读全文
posted @ 2024-06-14 14:47 星空28 阅读(37) 评论(0) 推荐(0) 编辑
摘要:参考:https://www.cnblogs.com/Yanjy-OnlyOne/p/12302955.html 阅读全文
posted @ 2024-06-14 14:45 星空28 阅读(8) 评论(0) 推荐(0) 编辑
摘要:import os, sys, re from PyQt5.QtWidgets import * from PyQt5.QtCore import Qt from PyQt5.QtGui import QBrush ''' void currentCellChanged(int currentRow 阅读全文
posted @ 2024-06-14 14:25 星空28 阅读(24) 评论(0) 推荐(0) 编辑
摘要:实例1 import sys from PyQt5.QtCore import Qt from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QMainWindow, QMessageBox, QApplication, QWidget, 阅读全文
posted @ 2024-06-14 14:06 星空28 阅读(44) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示