pyqt5
davin12
鲁迅说过:“如果人不学习,那和咸鱼有什么区别”。
展开
-
pyqt5 QImage 转 numpy.ndarray
使用python 的开源库 qimage2ndarrayqimage2ndarray文档from PyQt5 import QtCore, QtGui, QtWidgetsimport sysfrom PyQt5.QtCore import *from PyQt5.QtWidgets import *from PyQt5 import QtWidgetsfrom PyQt5 import QtGuiimport numpy as npimport qimage2ndarrayimport原创 2021-06-27 17:31:37 · 1806 阅读 · 3 评论 -
pyqt5 生成饼图并保存成图片
from PyQt5.QtWidgets import QApplication, QMainWindowimport sysfrom PyQt5.QtChart import QChart, QChartView, QPieSeries, QPieSlicefrom PyQt5.QtGui import QPainter, QPenfrom PyQt5.QtCore import Qtfrom PyQt5 import QtCore,QtGui,QtWidgetsclass Window(原创 2021-06-26 15:10:28 · 2525 阅读 · 0 评论 -
使用graphicsView的完善的画图及保存方案
之前出现GraphicsView画图会出现的问题做了改进,去掉边框以及对位置进行了判断from PyQt5 import QtCore, QtGui, QtWidgetsimport sysfrom PyQt5.QtCore import *from PyQt5.QtWidgets import *from PyQt5 import QtWidgetsfrom PyQt5 import QtGuiclass GraphicsView(QtWidgets.QGraphicsView):原创 2021-06-18 11:22:29 · 894 阅读 · 0 评论 -
pyqt5使用Qpainter 指定pdf文件进行打印
import osimport sysfrom PIL.ImageQt import ImageQtfrom PyQt5 import QtWidgetsfrom PyQt5.QtCore import QSize, Qtfrom PyQt5.QtGui import QPainterfrom PyQt5.QtPrintSupport import QPrintDialog, QPrinterfrom PyQt5.QtWidgets import QMainWindow, QFileDial原创 2021-06-05 21:07:32 · 888 阅读 · 0 评论 -
pyqt5 qtchart 画出饼图
from PyQt5.QtWidgets import QApplication, QMainWindowimport sysfrom PyQt5.QtChart import QChart, QChartView, QPieSeries, QPieSlicefrom PyQt5.QtGui import QPainter, QPenfrom PyQt5.QtCore import Qtclass Window(QMainWindow): def __init__(self):原创 2021-06-01 20:40:25 · 2989 阅读 · 6 评论 -
pyqt5使用qtchart画柱状图
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayoutfrom PyQt5.QtChart import QChart, QChartView, QBarSet, \ QPercentBarSeries, QBarCategoryAxisimport sysfrom PyQt5.QtGui import QIconclass Window(QWidget): def __init__(self):原创 2021-06-01 20:14:38 · 3320 阅读 · 1 评论 -
pyqt5 GraphicsView 加载图片 鼠标托画填充路径并保存成图片
本文仅供记录,各位如有参考,不胜荣幸解决之前临时变量销毁导致的程序奔溃,使用成员变量定义from PyQt5 import QtCore, QtGui, QtWidgetsimport sysfrom PyQt5.QtCore import *from PyQt5.QtGui import *from PyQt5.QtWidgets import *from PyQt5 import QtWidgetsfrom PyQt5 import QtGuiclass GraphicsView(原创 2021-04-21 21:42:33 · 854 阅读 · 0 评论 -
pyqt5 保存qGraphicsView编辑的图片
pyqt5 保存qGraphicsView编辑的图片本文参考 Filling a drawn path using QPainterPath in pyqt5from PyQt5 import QtCore, QtGui, QtWidgetsimport sysimport sysfrom PyQt5.QtCore import *from PyQt5.QtGui import *from PyQt5.QtWidgets import *from PyQt5 import QtWidget原创 2021-04-21 10:28:41 · 1824 阅读 · 2 评论