forked from 1qweasdzxc/Financial-Statement-Data-Analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrank.py
68 lines (63 loc) · 3.37 KB
/
rank.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '2.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form1(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(351, 489)
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(12)
Form.setFont(font)
self.textBrowser = QtWidgets.QTextBrowser(Form)
self.textBrowser.setGeometry(QtCore.QRect(0, 40, 351, 451))
font = QtGui.QFont()
font.setFamily("微软雅黑")
font.setPointSize(10)
self.textBrowser.setFont(font)
self.textBrowser.setStyleSheet("background-color: rgb(188, 188, 188);")
self.textBrowser.setObjectName("textBrowser")
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(0, 0, 351, 41))
self.textBrowser_2 = QtWidgets.QTextBrowser(Form)
self.textBrowser_2.setGeometry(QtCore.QRect(0, 40, 351, 31))
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setStyleSheet("background-color: rgb(255, 166, 148);")
self.label.setAlignment(QtCore.Qt.AlignCenter)
self.label.setObjectName("label")
self.textBrowser_2.setGeometry(QtCore.QRect(0, 40, 351, 31))
self.textBrowser_2.setStyleSheet("background-color: rgb(188, 188, 188);")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.textBrowser.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'微软雅黑\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><br /></p></body></html>"))
self.textBrowser_2.setHtml(_translate("Form", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'SimSun\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-family:\'微软雅黑\'; font-size:11pt;\">公司代码 公司名 公司评分</span></p></body></html>"))
self.label.setText(_translate("Form", "股票评分排名"))
f1=open("./rank.txt","rt")
for line in f1:
self.textBrowser.append(line.replace(",","\t"))
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
Dialog = QtWidgets.QDialog()
ui=Ui_Form1()
ui.setupUi(Dialog)
Dialog.show()
sys.exit(app.exec_())