node.py 864 B

1234567891011121314151617181920212223242526
  1. import sys
  2. sys.path.append("..")
  3. from PyQt5.QtWidgets import QApplication
  4. import mytool.json_helper.parse_json as parse_json
  5. from window_controller.main_window import MainWindow
  6. if __name__ == '__main__':
  7. # 读取文件
  8. config = parse_json.parse_json_with_comments('./config.json')
  9. # 数据库配置
  10. db_config = config['db_config']
  11. # 车库配置配置
  12. parking_config = config['parking_config']
  13. # rabbitmq配置
  14. mq_config = config['mq_config']
  15. passwd = parking_config['passwd']
  16. app = QApplication(sys.argv)
  17. mainWindow = MainWindow(parking_config, mq_config,db_config)
  18. mainWindow.showMaximized()
  19. mainWindow.plate_full_image_label.setMaximumSize(mainWindow.plate_full_image_label.size())
  20. mainWindow.plate_clip_image_label.setMaximumSize(mainWindow.plate_clip_image_label.size())
  21. sys.exit(app.exec_())