Python + PyQt5 + MySQL模拟QQ的聊天与娱乐软件


该软件基于python语言编写,使用MySQL存储数据,pyqt5编写图形化界面,实现功能包括聊天,文件上传与下载,飞机大战,项目信息以及引用了图灵机器人。
资源截图
代码片段和文件信息
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file ‘chengyuan.ui‘
#
# Created by: PyQt5 UI code generator 5.11.2
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore QtGui QtWidgets

path = ‘./img/1.jpg‘
path2 = ‘./img/2.jpg‘
path3 = ‘./img/3.jpg‘
path4 = ‘./img/4.jpg‘
path5 = ‘./img/5.jpg‘
path6 = ‘./img/6.jpg‘
path7 = ‘./img/7.jpg‘
flag = 0
flag2 = 0
flag3 = 0
flag4 = 0
flag5 = 0
flag6 = 0
flag7 = 0
class Ui_MainWindow(QtWidgets.QWidget):
    def setupUi(self MainWindow):
        MainWindow.setobjectName(“MainWindow“)
        MainWindow.resize(663 640)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setobjectName(“centralwidget“)

        self.label = QtWidgets.QLabel(self.centralwidget)
        self.label.setGeometry(QtCore.QRect(10 40 121 31))
        font = QtGui.QFont()
        font.setPointSize(18)
        font.setBold(True)
        font.setWeight(75)
        self.label.setFont(font)
        self.label.setobjectName(“label“)

        self.pushButton = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton.setGeometry(QtCore.QRect(60 90 88 88))
        font = QtGui.QFont()
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton.setFont(font)
        self.pushButton.setobjectName(“pushButton“)
        self.pushButton.setstyleSheet(‘border-image:url(%s)‘%path)
        self.pushButton.clicked.connect(self.change)

        self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_2.setGeometry(QtCore.QRect(210 90 88 88))
        font = QtGui.QFont()
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_2.setFont(font)
        self.pushButton_2.setobjectName(“pushButton_2“)
        self.pushButton_2.setstyleSheet(‘border-image:url(%s)‘%path2)
        self.pushButton_2.clicked.connect(self.change2)

        self.pushButton_3 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_3.setGeometry(QtCore.QRect(360 90 88 88))
        font = QtGui.QFont()
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_3.setFont(font)
        self.pushButton_3.setobjectName(“pushButton_3“)
        self.pushButton_3.setstyleSheet(‘border-image:url(%s)‘%path3)
        self.pushButton_3.clicked.connect(self.change3)

        self.pushButton_4 = QtWidgets.QPushButton(self.centralwidget)
        self.pushButton_4.setGeometry(QtCore.QRect(510 90 88 88))
        font = QtGui.QFont()
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.pushButton_4.setFont(font)
        self.pushButton_4.setobjectName(“pushButton_4“)
        self.pushButton_4.setstyleSheet(‘border-image:url(%s)‘%path4)
        self.pushButton_4.clicked.connect(s

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-24 20:52  .idea
     文件         192  2018-08-24 18:55  .ideamisc.xml
     文件         264  2018-07-16 09:18  .ideamodules.xml
     文件         563  2018-08-24 18:55  .ideaMyChat.iml
     文件       36454  2018-08-24 20:52  .ideaworkspace.xml
     目录           0  2018-08-24 20:26  __pycache__
     文件        7199  2018-08-20 13:46  __pycache__Client.cpython-36.pyc
     文件      762971  2018-08-21 19:19  back1.png
     文件       12661  2018-08-18 12:28  chengyuan.py
     文件        9593  2018-08-24 19:58  Client.py
     文件      473573  2018-08-23 18:53  feiji-background_1.png
     目录           0  2018-08-24 20:26  feiji
     目录           0  2018-08-24 20:26  feiji\__pycache__
     文件        1228  2018-08-13 09:54  feiji\__pycache__ackgroud_roll.cpython-36.pyc
     文件        1108  2018-08-24 19:37  feiji\__pycache__ackground_1.cpython-36.pyc
     文件         994  2018-08-19 15:11  feiji\__pycache__Bomber.cpython-36.opt-2.pyc
     文件        1028  2018-08-24 19:37  feiji\__pycache__Bomber.cpython-36.pyc
     文件        1018  2018-08-17 20:58  feiji\__pycache__Bomber.cpython-37.pyc
     文件        1820  2018-08-16 20:25  feiji\__pycache__ullet.cpython-36.opt-2.pyc
     文件        1796  2018-08-24 19:37  feiji\__pycache__ullet.cpython-36.pyc
     文件        1844  2018-08-16 22:38  feiji\__pycache__ullet.cpython-37.pyc
     文件        3940  2018-08-19 15:11  feiji\__pycache__enemy.cpython-36.opt-2.pyc
     文件        3944  2018-08-24 19:37  feiji\__pycache__enemy.cpython-36.pyc
     文件        3971  2018-08-16 23:13  feiji\__pycache__enemy.cpython-37.pyc
     文件        2090  2018-08-16 20:16  feiji\__pycache__myplane.cpython-36.opt-2.pyc
     文件        2058  2018-08-24 19:37  feiji\__pycache__myplane.cpython-36.pyc
     文件        2131  2018-08-14 21:47  feiji\__pycache__myplane.cpython-37.pyc
     文件         961  2018-08-15 00:07  feiji\__pycache__screen.cpython-37.pyc
     文件        1757  2018-08-21 18:03  feiji\__pycache__setting.cpython-36.opt-2.pyc
     文件        1050  2018-08-24 19:37  feiji\__pycache__setting.cpython-36.pyc
     文件        1119  2018-08-16 23:14  feiji\__pycache__setting.cpython-37.pyc
............此处省略260个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)