广告
返回顶部
首页 > 资讯 > 后端开发 > Python >PyQt5--QPixmap
  • 755
分享到

PyQt5--QPixmap

QPixmap 2023-01-30 22:01:01 755人浏览 独家记忆

Python 官方文档:入门教程 => 点击学习

摘要

1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9

 1 # -*- coding:utf-8 -*-
 2 '''
 3 Created on Sep 20, 2018
 4 
 5 @author: SaShuangYiBing
 6 
 7 Comment: 
 8 '''
 9 import sys
10 from PyQt5.QtGui import QPixmap
11 from PyQt5.QtWidgets import QApplication,QWidget,QHBoxLayout,QLabel
12 
13 class New_test(QWidget):
14     def __init__(self):
15         super().__init__()
16         self.initUI()
17         
18     def initUI(self):
19         hbx = QHBoxLayout(self)
20         lbl = QLabel(self)
21         lbl.setPixmap(QPixmap('python.jpg'))
22         hbx.addWidget(lbl)
23         self.setLayout(hbx)
24         
25         self.move(300,200)
26         self.setWindowTitle('picture')
27         self.show()
28         
29 if __name__ == '__main__':
30     app = QApplication(sys.argv)
31     ex = New_test()
32     sys.exit(app.exec_())

 

--结束END--

本文标题: PyQt5--QPixmap

本文链接: https://www.lsjlt.com/news/179659.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • PyQt5--QPixmap
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QPixmap
  • Python中的QPixmap怎么使用
    这篇文章主要讲解了“Python中的QPixmap怎么使用”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“Python中的QPixmap怎么使用”吧!QPixmap主要用于绘图,针对图像显示而...
    99+
    2023-07-05
  • Python中的QPixmap用法详解
    目录1.使用QPixmap显示图片2.使用QPixmap实现图片的缩放3.使用QPixmap实现图像的旋转4.使用QPixmap实现图像的扭曲QPixmap主要用于绘图,针对图像显示...
    99+
    2023-03-21
    QPixmap使用 python QPixmap用法
  • Qt图片绘图类之QPixmap/QImage/QPicture详解
    目录1、QPixmap2、QBitmap3、QImage4、QPicture5、QImage与pixmap的区别6、QPixmap与QImage相互转换7、视频显示的用法绘图设备是指...
    99+
    2023-03-11
    Qt图片绘图类 Qt QPixmap QImage QPicture Qt QPixmap Qt QImage Qt QPicture
  • Qt中QPixmap、QImage、QPicture、QBitmap四者区别详解
    目录前言QPixmap&QImageQBitmapQPicture参考:前言 Qt 提供了四个类来处理图像数据:QImage、QPixmap、QBitmap 和 QPictu...
    99+
    2022-11-13
  • mac python3.9安装pyqt5、qt5、pyqt5-tools
    仅供参考,需要根据自己实际修改 !!!arm 架构建议直接使用pyqt6,不折腾pyqt5 pyqt6安装参考 PyQT6:看这一篇就够了 python PyQt6 常用操作以及常见问题解决 pych...
    99+
    2023-09-25
    qt macos linux python
  • PyQt5--QSplitter
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QSplitter
  • PyQt5--QLineEdit
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QLineEdit
  • PyQt5--QCalendar
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QCalendar
  • PyQt5--QFileDiaglog
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 17, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QFileDiaglog
  • PyQt5--QCheckBox
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QCheckBox
  • PyQt5--QProgressBar
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QProgressBar
  • PyQt5--QFontDiaglog
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 17, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QFontDiaglog
  • PyQt5--QColorDiaglog
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 17, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QColorDiaglog
  • PyQt5--QSlide
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QSlide
  • PyQt5--QToggleButton
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 '' 9 i...
    99+
    2023-01-30
    QToggleButton
  • PyQt5--TextDrag
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 21, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    TextDrag
  • PyQt5--QComboBox
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 20, 2018 4 5 @author: SaShuangYiBing 6 7 Comment: 8 ''' 9 ...
    99+
    2023-01-30
    QComboBox
  • PyQt5--MenuBar
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 13, 2018 4 5 @author: SaShuangYiBing 6 ''' 7 import sys 8 fro...
    99+
    2023-01-30
    MenuBar
  • PyQt5--GridLayoutMul
    1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 13, 2018 4 5 @author: SaShuangYiBing 6 ''' 7 import sys 8 fro...
    99+
    2023-01-30
    GridLayoutMul
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作