class Demo(QWidget):
def __init__(self):
super(Demo,self).__init__()
self.username = QLabel("username:",self)
self.user_line = QLineEdit()
self.pwd = QLabel("password:",self)
self.pwd_line = QLineEdit()
self.g_layout = QGridLayout()
self.g_layout.addWidget(self.username,0,0)
self.g_layout.addWidget(self.user_line,0,1)
self.g_layout.addWidget(self.pwd,1,0)
self.g_layout.addWidget(self.pwd_line,1,1)
self.setLayout(self.g_layout)
登录界面网格结构
最新推荐文章于 2024-03-06 18:06:14 发布