随笔分类 -  PyQt5

摘要:import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * class spindemo(QWidget): def __init__(self, parent=None) 阅读全文
posted @ 2024-06-13 07:05 星空28 阅读(58) 评论(0) 推荐(0)
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class QSliderDemo(QWidget): def __init__(self): super(QS 阅读全文
posted @ 2024-06-13 07:01 星空28 阅读(123) 评论(0) 推荐(0)
摘要:PyQtGraph绘图参考 http://v3.byhy.net/tut/py/gui/pyqtgraph-1/ 阅读全文
posted @ 2024-06-13 06:53 星空28 阅读(36) 评论(0) 推荐(0)
摘要:from PyQt5.QtWidgets import * import pyqtgraph as pg import sys class MainWindow(QWidget): def __init__(self): super().__init__() self.setWindowTitle( 阅读全文
posted @ 2024-06-13 06:45 星空28 阅读(166) 评论(0) 推荐(0)
摘要:from PyQt5.QtWidgets import * import pyqtgraph as pg import sys class MainWindow(QWidget): def __init__(self): super().__init__() self.setWindowTitle( 阅读全文
posted @ 2024-06-13 06:41 星空28 阅读(185) 评论(0) 推荐(0)
摘要:from PyQt5.QtWidgets import * import pyqtgraph as pg import sys class MainWindow(QWidget): def __init__(self): super().__init__() self.setWindowTitle( 阅读全文
posted @ 2024-06-13 06:37 星空28 阅读(131) 评论(0) 推荐(0)
摘要:实例1:CPU使用率实时展示 from PyQt5 import QtWidgets,QtCore,QtGui import pyqtgraph as pg import sys import traceback import psutil class MainUi(QtWidgets.QMainW 阅读全文
posted @ 2024-06-13 06:16 星空28 阅读(711) 评论(0) 推荐(0)
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class WindowMaxMin(QWidget): def __init__(self, *args, * 阅读全文
posted @ 2024-06-11 06:01 星空28 阅读(131) 评论(0) 推荐(0)
摘要:from PyQt5.QtWidgets import * import sys class BasicQCSS(QWidget): def __init__(self): super().__init__() self.setWindowTitle("QSS样式/子控件选择器") btn1 = Q 阅读全文
posted @ 2024-06-10 15:40 星空28 阅读(77) 评论(0) 推荐(0)
摘要:from PyQt5.QtWidgets import * import sys class BasicQCSS(QWidget): def __init__(self): super().__init__() self.setWindowTitle("QSS样式") btn1 = QPushBut 阅读全文
posted @ 2024-06-10 15:22 星空28 阅读(78) 评论(0) 推荐(0)
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class Drawing(QWidget): def __init__(self, *args, **kwar 阅读全文
posted @ 2024-06-10 14:32 星空28 阅读(44) 评论(0) 推荐(0)
摘要: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 阅读(42) 评论(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 阅读(161) 评论(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 阅读(165) 评论(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:46 星空28 阅读(33) 评论(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 阅读(106) 评论(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 阅读(68) 评论(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 阅读(33) 评论(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:59 星空28 阅读(57) 评论(0) 推荐(0)
摘要:··· from PyQt5.QtCore import * class NNSignal(QObject): # 定义一个信号 signal1 = pyqtSignal() # 发送3个参数的信号 signal2 = pyqtSignal(int) signal3 = pyqtSignal() d 阅读全文
posted @ 2024-06-08 09:57 星空28 阅读(22) 评论(0) 推荐(0)