2 Star 0 Fork 0

Michael Ji/QXDM自动化

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.py 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
import sys, time
from PyQt5.QtWidgets import QApplication, QDialog, QHBoxLayout, QPushButton
from PyQt5 import QtGui
from QxdmDlg import CQxdmTranslatorDlg
from SerialDlg import CSerialMonitorDlg
import Ui.sys_rc
main_window = None
main_icon = None
def show_serial_monitor():
serial_monitor = CSerialMonitorDlg()
serial_monitor.setWindowIcon(main_icon)
main_window.hide()
if serial_monitor.exec_() == 0:
time.sleep(0.1)
main_window.show()
def show_qxdm_translator():
qxdm_translator = CQxdmTranslatorDlg()
qxdm_translator.setWindowIcon(main_icon)
main_window.hide()
if qxdm_translator.exec_() == 0:
time.sleep(0.1)
main_window.show()
if __name__ == "__main__":
app = QApplication([])
window = QDialog()
main_window = window
icon = QtGui.QIcon()
main_icon = icon
icon.addPixmap(QtGui.QPixmap(":/img/5g"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
window.setWindowIcon(icon)
# app.setStyleSheet(open("./Ui/style.qss").read())
window.setWindowTitle('Commands Translator v0.13')
hBox = QHBoxLayout(window)
window.setMinimumSize(500, 100)
serial_push_button = QPushButton('Serial Monitor')
serial_push_button.setMinimumHeight(40)
serial_push_button.clicked.connect(show_serial_monitor)
qxdm_push_button = QPushButton('QXDM Translator')
qxdm_push_button.setMinimumHeight(40)
qxdm_push_button.clicked.connect(show_qxdm_translator)
hBox.addWidget(serial_push_button)
hBox.addWidget(qxdm_push_button)
window.show()
sys.exit(app.exec_())
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/jibintao/qxdm.git
git@gitee.com:jibintao/qxdm.git
jibintao
qxdm
QXDM自动化
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385