def __init__(self):
QWidget.__init__(self, flags=Qt.Widget)
# ?? ??
self.gb = QGroupBox(self.tr("Serial"))
self.cb_port = QComboBox()
self.cb_baud_rate = QComboBox()
self.cb_data_bits = QComboBox()
self.cb_flow_control = QComboBox()
self.cb_parity = QComboBox()
self.cb_stop_bits = QComboBox()
# ??? ???? ??
# ??? ??? ?? ? ??
self.serial = QSerialPort()
self.serial_info = QSerialPortInfo()
self.serial_read_thread = SerialReadThread(self.serial)
self.serial_read_thread.received_data.connect(lambda v: self.received_data.emit(v))
self.serial_read_thread.start()
self.init_widget()
评论列表
文章目录