-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathpyqt.py
47 lines (28 loc) · 970 Bytes
/
pyqt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#-*-coding:utf-8-*-
import sys
from PyQt5.QtWidgets import (QApplication,QWidget,QPushButton,QMessageBox, QPlainTextEdit,QTextEdit, QTextBrowser)
from PyQt5.QtGui import QIcon
from PyQt5 import QtCore
class QQ(QWidget):
def __init__(self):
super().__init__()
self.init()
def init(self):
self.setGeometry(100,50,800,550)
self.setWindowTitle('QQ聊天室')
self.setWindowIcon(QIcon('image/QQicon.ico'))
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.bt1=QPushButton('发送',self)
self.bt1.move(20,500)
self.brower=QTextBrowser(self)
self.brower.move(10,50)
self.bt1.clicked.connect(self.message)
self.inputtext=QTextEdit(self)
self.inputtext.move(20,300)
self.show()
def message(self):
self.inputtext.append("hell0")
if __name__=="__main__":
app=QApplication(sys.argv)
qq=QQ()
sys.exit(app.exec_())