今天把前天與今天的內容做一個結合:
# -*- coding: utf-8 -*-
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from Scraping import filter_article
import sys
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(600, 800)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setSpacing(10)
self.gridLayout.setObjectName("gridLayout")
self.label = QtWidgets.QLabel(Form)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.comboBox = QtWidgets.QComboBox(Form)
self.comboBox.setObjectName("comboBox")
self.comboBox.addItems(['THSRshare', 'NBA', 'forsale', 'mobilesales'])
self.gridLayout.addWidget(self.comboBox, 1, 0, 1, 2)
self.pushButton = QtWidgets.QPushButton(Form)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
self.pushButton.setSizePolicy(sizePolicy)
self.pushButton.setObjectName("pushButton")
self.gridLayout.addWidget(self.pushButton, 1, 2, 1, 1)
self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1)
self.comboBox_2 = QtWidgets.QComboBox(Form)
self.comboBox_2.setObjectName("comboBox_2")
self.gridLayout.addWidget(self.comboBox_2, 3, 0, 1, 1)
self.lineEdit = QtWidgets.QLineEdit(Form)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 3, 1, 1, 2)
self.treeWidget = QtWidgets.QTreeWidget(Form)
self.treeWidget.setObjectName("treeWidget")
self.gridLayout.addWidget(self.treeWidget, 4, 0, 1, 3)
item = QtWidgets.QTreeWidgetItem(self.treeWidget)
item.setData(0,0,'haha')
item.setData(1,0,'123456789')
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "爬蟲工具"))
self.label.setText(_translate("Form", "看板"))
self.pushButton.setText(_translate("Form", "+"))
self.label_2.setText(_translate("Form", "關鍵字搜尋"))
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QDialog()
ui = Ui_Form()
ui.setupUi(window)
window.show()
sys.exit(app.exec_())
終於來到第30天拉~~在寫文章的過程中,也發現自己的不足之處,以往寫程式常常可以跑得動就好,但要寫成文章給別人讀又要找好多資料,常常在找資料的過程中又學到了不少東西,能夠把文章整理的通順也是需要功夫,才知道網路上常常看到別人分享的文章背後是下了多少苦心
要能夠每天寫30篇真的不是一件簡單的事呢,尤其中間遇到好多事情讓挑戰差點中斷哈哈,中間其實有好多文章都想要再補充,之後有時間再來把內容補完整吧,總之感謝鐵人賽讓我有這個機會可以把學到的東西整理出來,雖然內容不是很理想,但希望如果有人看了文章也學到一些東西,那我就心滿意足了哈哈