This repository has been archived on 2024-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
mathdeptv2/工具v4/获取题号.py

34 lines
974 B
Python

from PySide6.QtWidgets import QWidget, QApplication, QFileDialog
from Ui_获取题号 import Ui_Form
import os
from database_tools_2 import *
class MyWindow_hqth(QWidget,Ui_Form):
def __init__(self):
super().__init__()
self.setupUi(self)
self.bind()
def bind(self):
self.pushButton_exec.setDisabled(True)
self.pushButton_selectfilepath.clicked.connect(self.selectfilepath)
self.pushButton_exec.clicked.connect(self.exec)
def selectfilepath(self):
self.filepath = QFileDialog.getOpenFileName(self,"选择.tex文件或.pdf文件",os.getcwd(),"tex或pdf文件(*.tex *.pdf);;所有文件(*)")[0]
self.lineEdit.setText(self.filepath)
self.pushButton_exec.setEnabled(True)
def exec(self):
self.plainTextEdit.setPlainText(ExportIDList(self.filepath))
if __name__ == '__main__':
app = QApplication([])
windows = MyWindow()
windows.show()
app.exec()