diff --git a/工具v2/Qt面板.py b/工具v2/Qt面板.py
index b19ec4de..6576c28a 100644
--- a/工具v2/Qt面板.py
+++ b/工具v2/Qt面板.py
@@ -1,8 +1,6 @@
from PySide6.QtWidgets import QMainWindow, QApplication, QFileDialog, QWidget
from Ui_Qt面板 import *
-from Ui_寻找空闲题号 import *
-import os
-from database_tools import *
+from subprocess import call
class MyWindow(QMainWindow,Ui_MainWindow):
@@ -12,34 +10,12 @@ class MyWindow(QMainWindow,Ui_MainWindow):
self.bind()
def bind(self):
- self.subwindow = kxthWindow()
- self.action_kxth.triggered.connect(lambda: self.subwindow.show())
+ self.action_kxth.triggered.connect(lambda: call(["python", "系列讲义生成.py"]))
+ self.action_xtbd.triggered.connect(lambda: call(["python", "新题比对.py"]))
-class kxthWindow(QWidget,Ui_Form):
- def __init__(self):
- super().__init__()
- self.setupUi(self)
- self.bind()
- self.lineEdit_FilePath.setText(os.path.join(os.path.dirname(os.getcwd()),"题库0.3","Problems.json"))
- self.ShowAvailable()
-
-
- def bind(self):
- self.pushButton_SelectFilepath.clicked.connect(self.getFilePathandShow)
-
- def ShowAvailable(self):
- self.jsonpath = self.lineEdit_FilePath.text()
- pro_dict = load_dict(self.jsonpath)
- self.label_Available.setText(spareIDs(pro_dict))
-
- def getFilePathandShow(self):
- pathlist = QFileDialog.getOpenFileName(self,"选择文件",".","json文件(*.json);;所有文件(*)")
- self.lineEdit_FilePath.setText(pathlist[0])
- self.ShowAvailable()
-
diff --git a/工具v2/Qt面板.ui b/工具v2/Qt面板.ui
index 96a89548..6b76a2cf 100644
--- a/工具v2/Qt面板.ui
+++ b/工具v2/Qt面板.ui
@@ -7,11 +7,11 @@
0
0
426
- 366
+ 330
- MainWindow
+ 题库工具面板(PyQt)-20240301