PyQt5--QPixmap

 # -*- coding:utf-8 -*-
'''
Created on Sep 20, 2018 @author: SaShuangYiBing Comment:
'''
import sys
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QApplication,QWidget,QHBoxLayout,QLabel class New_test(QWidget):
def __init__(self):
super().__init__()
self.initUI() def initUI(self):
hbx = QHBoxLayout(self)
lbl = QLabel(self)
lbl.setPixmap(QPixmap('python.jpg'))
hbx.addWidget(lbl)
self.setLayout(hbx) self.move(300,200)
self.setWindowTitle('picture')
self.show() if __name__ == '__main__':
app = QApplication(sys.argv)
ex = New_test()
sys.exit(app.exec_())
上一篇:Centos7.4别名设置提高工作效率


下一篇:js中session操作