PyQt5--Position
1 # -*- coding:utf-8 -*- 2 ''' 3 Created on Sep 13, 2018 4 5 @author: SaShuangYiBing 6 ''' 7 import sys 8 from PyQt5.QtWidgets import QApplication,QWidget,QLabel 9 10 class New_test(QWidget): 11 def __init__(self): 12 super().__init__() 13 self.initUI() 14 15 def initUI(self): 16 lbl1 = QLabel('zetcode',self) 17 lbl1.move(15,10) 18 lbl2 = QLabel('tutorials',self) 19 lbl2.move(35,40) 20 lbl3 = QLabel('for programmers',self) 21 lbl3.move(55,70) 22 23 self.setGeometry(300,300,250,150) 24 self.setWindowTitle('Absolute') 25 self.show() 26 27 if __name__ == "__main__": 28 app = QApplication(sys.argv) 29 ex = New_test() 30 sys.exit(app.exec_())