# -*- 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_())