PyQt5基础学习-QLabel().move(绝对布局)
作者:互联网
使用.move将控件水平移动到特定的位置, 被称为绝对布局
AbsoluteLayout.py
""" 绝对布局 """ import sys, math from PyQt5.QtWidgets import * class AbsoluteLayout(QWidget): def __init__(self): super(AbsoluteLayout, self).__init__() self.setWindowTitle("绝对布局") self.label1 = QLabel('欢迎', self) self.label1.move(15, 20) self.label2 = QLabel('学习', self) self.label2.move(35, 40) self.label3 = QLabel('PyQt5', self) self.label3.move(55, 80) if __name__ == "__main__": app = QApplication(sys.argv) main = AbsoluteLayout() main.show() sys.exit(app.exec_())
标签:__,self,move,PyQt5,AbsoluteLayout,QLabel 来源: https://www.cnblogs.com/hyq-lst/p/15865548.html