我有一个带循环的python脚本:
n = 0
while num_messages == 0 or n < num_messages:
time.sleep(0.1)
while x4m300.peek_message_presence_single():
presence_single = x4m300.read_message_presence_single()
print(""
+ " FrameCounter: " + str(presence_single.frame_counter)
+ ", State: " + presence_state_text[presence_single.presence_state]
+ ", Distance: " + str(round(presence_single.distance,2))
+ ", SignalQuality: " + str(presence_single.signal_quality)
)
n += 1
此代码循环打印帧计数器,状态,距离和信号质量(取决于给定的消息数)。我想知道如何使用pyqt5在gui中的每个迭代中显示它,在那里我可以看到变化的文本或其他可能的方式来仅显示输出。我是一个初学者,我真的不知道。预先谢谢你!