Python之GUI:基于Python的GUI界面设计的一套AI课程学习(机器学习、深度学习、大数据、云计算等)推荐系统(包括语音生成、识别等前沿黑科技)

简介: Python之GUI:基于Python的GUI界面设计的一套AI课程学习(机器学习、深度学习、大数据、云计算等)推荐系统(包括语音生成、识别等前沿黑科技)

输出结果

https://img-blog.csdn.net/20180529114418537

image.png

image.png

核心代码

def niu_read_docx(filename):

    doc=docx.Document(filename)

    fulltext=[]

    for para in doc.paragraphs:

        fulltext.append(para.text)

    return '\n'.join(fulltext)

class dialog(QDialog, Ui_dialog):

   """

   Class documentation goes here.

   """

   def __init__(self, parent=None):

       """

       Constructor

     

       @param parent reference to the parent widget

       @type QWidget

       """

       super(dialog, self).__init__(parent)

       self.setupUi(self)

     

       time.sleep(2) #使开机画面停留2秒

 

   @pyqtSlot()

   def on_pushButton_clicked(self):

       """

       Slot documentation goes here.

       """

       my_str_2=self.lineEdit_2.text()

       my_str_3=self.lineEdit_3.text()

       my_str_4=self.lineEdit_4.text()

     

       print(my_str, my_str_2, my_str_3, my_str_4)

       Button1_1=QMessageBox.information(self, u'提示信息框', u'输入的s所有信息已经存储到数据库中!', ) #提示对话信息框

       print('OK')

       self.close() #关闭当前界面

 

   @pyqtSlot()

   def on_pushButton_2_clicked(self):

       """

       Slot documentation goes here.

       """

       print('Cancel')

class MainWindow(QMainWindow, Ui_MainWindow):

   """

   Class documentation goes here.

   """

   def __init__(self, parent=None):

       """

       Constructor

       @param parent reference to the parent widget

       @type QWidget

       """

       super(MainWindow, self).__init__(parent)

       self.setupUi(self)

       self.graphicsView.mousePressEvent=self.my_clicked

     

   def my_clicked(self, e):

       print('自定义的点击事件函数')

       webbrowser.open('www.baidu.com') #默认浏览器打开指定网址

   @pyqtSlot()

   def on_pushButton_clicked(self):

       """

       Slot documentation goes here.

       """

       print(self.textBrowser.toPlainText())

 

   @pyqtSlot()

   def on_pushButton_2_clicked(self):

       """

       Slot documentation goes here.

       这是测试按钮的槽函数

       """

       self.lineEdit.setText( "")  #清除单行文本框内容

       self.lineEdit_2.setText( "")

       self.textBrowser.setText( "") #清除多行文本框内容

       print("清除登陆账号信息!")

 

   @pyqtSlot()

   def on_pushButton_3_clicked(self):

       """

       Slot documentation goes here.

       """

       my_str=self.lineEdit.text()+":"+self.lineEdit_2.text() #获取单行文本框的内容

       self.textBrowser.append(my_str) #向多行文本添加内容

       print(my_str)

     

   @pyqtSlot()

   def on_pushButton_4_clicked(self):

       """

       Slot documentation goes here.

       该按钮命令调用的预定义的函数,退出的命令

       """

   @pyqtSlot()

   def on_pushButton_5_clicked(self):

       """

       Slot documentation goes here.

       """

       Button5=QMessageBox.question(self, u'提示信息框', u'是否全部保存到数据库中?')

       if Button5==0:

           print('全部保存中……')

       else:

           print('没有保存')

         

     

   @pyqtSlot()

   def on_pushButton_6_clicked(self):

       """

       Slot documentation goes here.

       """

       Button6=QMessageBox.warning(self, u'提警告信息框', u'没有警告信息,请继续输入!')

     

   @pyqtSlot()

   def on_pushButton_7_clicked(self):

       """

       Slot documentation goes here.

       """

       Button7=QMessageBox.critical(self, u'严重警告!', u'没有严重警告信息,请继续输入!')

 

   @pyqtSlot()

   def on_pushButton_9_clicked(self):

       """

       Slot documentation goes here.

       """

       self.graphicsView.setStyleSheet("border-image: url(:/im/image/AI (4).jpg);")

     

     

#    @pyqtSlot(QUrl)

   def on_textBrowser_anchorClicked(self, p0):

       """

       Slot documentation goes here.

     

       @param p0 DESCRIPTION

       @type QUrl

       """

   @pyqtSlot()

   def on_radioButton_clicked(self):

       """

       Slot documentation goes here.

       """

       print('同时选择其他三个首个radioButton')

       self.radioButton_12.setChecked(True)

       self.radioButton_16.setChecked(True)

       self.radioButton_20.setChecked(True)

       self.label_4.setStyleSheet("border-image: url(:/im/image/AI (4).jpg);")


相关实践学习
基于MaxCompute的热门话题分析
Apsara Clouder大数据专项技能认证配套课程:基于MaxCompute的热门话题分析
相关文章
|
9月前
|
存储 分布式计算 大数据
基于Python大数据的的电商用户行为分析系统
本系统基于Django、Scrapy与Hadoop技术,构建电商用户行为分析平台。通过爬取与处理海量用户数据,实现行为追踪、偏好分析与个性化推荐,助力企业提升营销精准度与用户体验,推动电商智能化发展。
|
9月前
|
数据可视化 关系型数据库 MySQL
基于python大数据的的海洋气象数据可视化平台
针对海洋气象数据量大、维度多的挑战,设计基于ECharts的可视化平台,结合Python、Django与MySQL,实现数据高效展示与交互分析,提升科研与决策效率。
|
10月前
|
数据可视化 搜索推荐 大数据
基于python大数据的北京旅游可视化及分析系统
本文深入探讨智慧旅游系统的背景、意义及研究现状,分析其在旅游业中的作用与发展潜力,介绍平台架构、技术创新、数据挖掘与服务优化等核心内容,并展示系统实现界面。
|
9月前
|
机器学习/深度学习 大数据 关系型数据库
基于python大数据的台风灾害分析及预测系统
针对台风灾害预警滞后、精度不足等问题,本研究基于Python与大数据技术,构建多源数据融合的台风预测系统。利用机器学习提升路径与强度预测准确率,结合Django框架实现动态可视化与实时预警,为防灾决策提供科学支持,显著提高应急响应效率,具有重要社会经济价值。
|
9月前
|
数据可视化 大数据 关系型数据库
基于python大数据技术的医疗数据分析与研究
在数字化时代,医疗数据呈爆炸式增长,涵盖患者信息、检查指标、生活方式等。大数据技术助力疾病预测、资源优化与智慧医疗发展,结合Python、MySQL与B/S架构,推动医疗系统高效实现。
|
9月前
|
机器学习/深度学习 大数据 关系型数据库
基于python大数据的青少年网络使用情况分析及预测系统
本研究基于Python大数据技术,构建青少年网络行为分析系统,旨在破解现有防沉迷模式下用户画像模糊、预警滞后等难题。通过整合多平台亿级数据,运用机器学习实现精准行为预测与实时干预,推动数字治理向“数据驱动”转型,为家庭、学校及政府提供科学决策支持,助力青少年健康上网。

推荐镜像

更多