Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def initUI(self):
- chat = QLabel('Chat')
- chatEdit = QTextEdit()
- sendEdit = QLineEdit()
- nameEdit = QLabel('Name: ')
- btnSend = QPushButton('Отправить')
- grid = QGridLayout()
- grid.setSpacing(10)
- grid.addWidget(chat, 1, 0)
- grid.addWidget(nameEdit, 1, 1)
- grid.addWidget(chatEdit, 2, 0, 3, 0)
- grid.addWidget(sendEdit, 5, 0)
- grid.addWidget(btnSend, 5, 1)
- self.setLayout(grid)
- self.setGeometry(300, 300, 350, 300)
- self.setWindowTitle('CHAT')
- self.show()
- def registration(self):
- alias, ok = QInputDialog.getText(self, 'Your NAME', 'Enter your name:')
- if ok and alias != '':
- self.nameEdit.setText(name)
- self.nameEdit.adjustSize()
- return alias
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement