PyQt5_QSerialPort_Terminal.zip

时间:2023-04-13 12:41:13
【文件属性】:

文件名称:PyQt5_QSerialPort_Terminal.zip

文件大小:261KB

文件格式:ZIP

更新时间:2023-04-13 12:41:13

PyQt5 QSerialPort Terminal

根据QT5官方样例修改为PyQt5 版本. if __name__ == '__main__': app = QApplication(sys.argv) win = MainWindow() win.show() sys.exit(app.exec_()) class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): """docstring for MainWindow""" def __init__(self): super(MainWindow, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.console = Console(self) self.console.setEnabled(True) self.setCentralWidget(self.console) self.settings = SettingsDialog() self.serial = QSerialPort() self.status = QLabel() self.ui.actionConnect.setEnabled(True) self.ui.actionDisconnect.setEnabled(False) self.ui.actionQuit.setEnabled(True) self.ui.actionConfigure.setEnabled(True) self.ui.statusBar.addWidget(self.status) self.initActionsConnections() self.serial.error.connect(self.handleError) self.serial.readyRead.connect(self.readData) self.console.getData.connect(self.writeData)


【文件预览】:
terminal
----convert_ui_2_py.bat(94B)
----terminal.qrc(277B)
----settingsdialog.ui(5KB)
----terminal.py(9KB)
----settingsdialog.py(7KB)
----mainwindow.ui(5KB)
----images()
--------settings.png(16KB)
--------connect.png(15KB)
--------disconnect.png(15KB)
--------application-exit.png(11KB)
--------clear.png(12KB)
----terminal_rc.py(578KB)
----mainwindow.py(6KB)

网友评论