用户:英俊小子查看:0 回复:0 评论:0 创建时间:2020-05-31T16:55:23
【作品展示】

【作品介绍】
可能不太好用,谅解
【作品源代码】
import sys
from PySide2.QtWidgets import *
#if __name__ == '__main__':
from Ui_charts import Ui_Charts
from plots import plots
from PySide2.QtCore import QUrl
from PySide2.QtWebEngineWidgets import QWebEngineView
class Hello(QMainWindow, Ui_Charts):
def __init__(self):
super().__init__()
self.setupUi(self)
self.show()
self.pbtn_data.clicked.connect(self.select_file)
self.cb_chart_list.currentIndexChanged.connect(self.plot)
def initset(self):
self.browser=QWebEngineView()
self.vl_chart.addWidget(self.browser)
def select_file(self):
self.data_file,_=QFileDialog.getOpenFileName(caption='选择数据文件',filter='(*.json)')
self.lb_info.setText(self.data_file)
self.plot()
def plot(self):
index_text = self.cb_chart_list.currentText()
self.lb_info.setText(index_text)
if self.data_file:
plots(self.data_file,index_text)
self.browser.load(QUrl)
if __name__ == '__main__':
app = QApplication(sys.argv)
window = Hello()
sys.exit(app.exec_())
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn