06 2024 档案

摘要:服务端代码 #! /usr/bin/env python #-*- coding:utf-8 -*- import socket import threading class ThreadedServer(object): def __init__(self, host, port): self.h 阅读全文
posted @ 2024-06-28 14:08 星空28 阅读(30) 评论(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 阅读(17) 评论(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 阅读(28) 评论(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 阅读(17) 评论(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 阅读(41) 评论(0) 推荐(0) 编辑
摘要:""" 动态显示当前时间 QTimer QThread """ from PyQt5.QtWidgets import QWidget, QMessageBox, QVBoxLayout, QPushButton, QLCDNumber, QApplication, QListWidget, QGr 阅读全文
posted @ 2024-06-14 16:48 星空28 阅读(13) 评论(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 阅读(19) 评论(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 阅读(36) 评论(0) 推荐(0) 编辑
摘要:参考:https://www.cnblogs.com/Yanjy-OnlyOne/p/12302955.html 阅读全文
posted @ 2024-06-14 14:45 星空28 阅读(7) 评论(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 阅读(23) 评论(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 阅读(42) 评论(0) 推荐(0) 编辑
摘要:实例1: from PyQt5.QtWidgets import QMessageBox, QListView, QStatusBar, QMenuBar, QMenu, QAction, QLineEdit, QStyle, QFormLayout, QVBoxLayout,QWidget,QAp 阅读全文
posted @ 2024-06-14 11:08 星空28 阅读(41) 评论(0) 推荐(0) 编辑
摘要:二维表 数据源 需要创建QTableView实例和一个数据源Model,然后将两者关联 MVC: Model + Viewer + Controller MVC的目的是将后端的数据和前端页面的耦合度降低 import sys from PyQt5 import QtPrintSupport, QtG 阅读全文
posted @ 2024-06-14 11:01 星空28 阅读(26) 评论(0) 推荐(0) 编辑
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5 import QtPrintSupport, QtGui from PyQt5.QtPri 阅读全文
posted @ 2024-06-14 10:53 星空28 阅读(23) 评论(0) 推荐(0) 编辑
摘要:参考https://www.cnblogs.com/jgg54335/p/14904853.html 实例一: import sys from PyQt5.QtWidgets import QApplication, QWidget from PyQt5.QtGui import QPainter, 阅读全文
posted @ 2024-06-13 17:50 星空28 阅读(18) 评论(0) 推荐(0) 编辑
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtWidgets import * from PyQt5.QtGui import * class FontDialogdemo(QWidget): def __init__(self, parent 阅读全文
posted @ 2024-06-13 17:25 星空28 阅读(6) 评论(0) 推荐(0) 编辑
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class InputdialogDemo(QWidget): def __init__(self, paren 阅读全文
posted @ 2024-06-13 17:18 星空28 阅读(10) 评论(0) 推荐(0) 编辑
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class QMessageBoxDemo(QWidget): def __init__(self): supe 阅读全文
posted @ 2024-06-13 15:49 星空28 阅读(34) 评论(0) 推荐(0) 编辑
摘要:import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class QDialogDemo(QMainWindow): def __init__(self): supe 阅读全文
posted @ 2024-06-13 15:25 星空28 阅读(8) 评论(0) 推荐(0) 编辑
摘要:from PyQt5.QtWidgets import QApplication, QWidget, QStackedLayout, QVBoxLayout from PyQt5.QtWidgets import QPushButton, QComboBox, QSizePolicy import 阅读全文
posted @ 2024-06-13 09:23 星空28 阅读(105) 评论(0) 推荐(0) 编辑
摘要: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 阅读(14) 评论(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:00 星空28 阅读(45) 评论(0) 推荐(0) 编辑
摘要:PyQtGraph绘图参考 http://v3.byhy.net/tut/py/gui/pyqtgraph-1/ 阅读全文
posted @ 2024-06-13 06:52 星空28 阅读(15) 评论(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 阅读(58) 评论(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 阅读(79) 评论(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 阅读(46) 评论(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 阅读(328) 评论(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 阅读(30) 评论(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:39 星空28 阅读(28) 评论(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 阅读(23) 评论(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:31 星空28 阅读(11) 评论(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 阅读(18) 评论(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 阅读(49) 评论(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 阅读(58) 评论(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 阅读(9) 评论(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 阅读(44) 评论(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 阅读(19) 评论(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 阅读(12) 评论(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 阅读(15) 评论(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 阅读(6) 评论(0) 推荐(0) 编辑
摘要:··· from PyQt5.QtCore import * class MultiSignal(QObject): # 定义一个信号 signal1 = pyqtSignal() # 发送3个参数的信号 signal2 = pyqtSignal(int) signal3 = pyqtSignal( 阅读全文
posted @ 2024-06-08 06:50 星空28 阅读(10) 评论(0) 推荐(0) 编辑
摘要:from PyQt5.QtCore import * class MyTypeSignal(QObject): # 定义一个信号 sendmsg = pyqtSignal(object) # 发送3个参数的信号 sendmsg1 = pyqtSignal(str, int, int) def run 阅读全文
posted @ 2024-06-08 05:34 星空28 阅读(14) 评论(0) 推荐(0) 编辑
摘要:窗口类型: QMainWindow:可以包含菜单栏、工具栏、状态栏、标题栏 QWidget:不确定窗口的用途,就使用QWidget QDialog: 是对话窗口的基类,没有菜单栏、工具栏、状态栏 from PyQt5.QtWidgets import QWidget, QDesktopWidget, 阅读全文
posted @ 2024-06-07 16:47 星空28 阅读(19) 评论(0) 推荐(0) 编辑
摘要:""" 菜单栏 """ from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class ButtonPanel(QtWidgets.QWidget): def __init__(self, 阅读全文
posted @ 2024-06-07 15:04 星空28 阅读(12) 评论(0) 推荐(0) 编辑
摘要:import os.path from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class SpinBoxPanel(QtWidgets.QWidget): def __init__(s 阅读全文
posted @ 2024-06-05 12:11 星空28 阅读(45) 评论(0) 推荐(0) 编辑
摘要:""" 复选框 """ import os.path from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class ButtonPanel(QtWidgets.QWidget): def 阅读全文
posted @ 2024-06-05 10:38 星空28 阅读(44) 评论(0) 推荐(0) 编辑
摘要:import os.path from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class ButtonPanel(QtWidgets.QWidget): def __init__(se 阅读全文
posted @ 2024-06-05 09:26 星空28 阅读(18) 评论(0) 推荐(0) 编辑
摘要:from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class TextDemoPanel(QtWidgets.QWidget): def __init__(self, *args, ** 阅读全文
posted @ 2024-06-05 07:06 星空28 阅读(25) 评论(0) 推荐(0) 编辑
摘要:选择文件夹,显示图片 import os from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class ButtonPanel(QtWidgets.QWidget): def __ini 阅读全文
posted @ 2024-06-04 18:12 星空28 阅读(57) 评论(0) 推荐(0) 编辑
摘要:图片滚动 import os from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class ButtonPanel(QtWidgets.QWidget): def __init__(se 阅读全文
posted @ 2024-06-04 17:20 星空28 阅读(43) 评论(0) 推荐(0) 编辑
摘要:from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 def click_btn1(): print("click button 1") txt_label.setText("我是按钮1点击 阅读全文
posted @ 2024-06-04 15:43 星空28 阅读(24) 评论(0) 推荐(0) 编辑
摘要:from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) main_win = Qt 阅读全文
posted @ 2024-06-04 15:39 星空28 阅读(16) 评论(0) 推荐(0) 编辑
摘要:from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 class ButtonPanel(QtWidgets.QWidget): def __init__(self, *args, **kw 阅读全文
posted @ 2024-06-04 15:38 星空28 阅读(48) 评论(0) 推荐(0) 编辑
摘要:from PyQt5 import QtWidgets from PyQt5 import QtCore, QtGui import sys import cv2 if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) ma 阅读全文
posted @ 2024-06-04 15:37 星空28 阅读(10) 评论(0) 推荐(0) 编辑
摘要:from PyQt5 import QtCore, QtGui import sys import cv2 if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) main_win = QtWidgets.QMainWind 阅读全文
posted @ 2024-06-04 15:32 星空28 阅读(29) 评论(0) 推荐(0) 编辑
摘要:彩色图像通道顺序是BGR blue = img[78, 125, 0] # 蓝色通道 green = img[78, 125, 1] # 绿色通道 red = img[78, 125, 2] # 红色通道 修改像素 img[100, 99, 0] = 255 # 修改第0个通道 img[100, 9 阅读全文
posted @ 2024-06-03 02:43 星空28 阅读(13) 评论(0) 推荐(0) 编辑

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