加了主前端

main
XinqiQin 6 months ago
parent 80936bae6d
commit 6190617dec

@ -352,7 +352,8 @@ class MainWindow(QMainWindow):
self.ui.comboBox.clear()
# 定时器开启,每隔一段时间,读取一帧
self.timer_camera.start(1)
#qxq33帧更加流畅
self.timer_camera.start(33)
self.timer_camera.timeout.connect(self.open_frame)
def tabel_info_show(self, locations, clses, confs, path=None):
@ -615,10 +616,4 @@ class btn2Thread(QThread):
def stop(self):
self.is_running = False
if __name__ == "__main__":
app = QApplication(sys.argv)
win = MainWindow()
win.show()
sys.exit(app.exec_())
#qxq删除原本MainProgram的入口改为进入UIProgram.MainFrontend.py

@ -4,5 +4,9 @@ class QSSLoader:
@staticmethod
def read_qss_file(qss_file_name):
with open(qss_file_name, 'r', encoding='UTF-8') as file:
return file.read()
with open(qss_file_name, 'rb') as file:
content = file.read()
try:
return content.decode('utf-8')
except UnicodeDecodeError:
return content.decode('gbk', errors='ignore')
Loading…
Cancel
Save