How to implement a QThread that runs forever{} with a QWaitCondition but still needs to catch another Slot while doing that

前端 未结 3 1282
南方客
南方客 2021-01-12 13:29

I implemented a class that can write data to a serial port via a QQueue and read from it by a slot. I use QAsyncSerial for this which in turn uses boost::asio with a callbac

3条回答
  •  离开以前
    2021-01-12 14:01

    This is kind of a shot in the dark, since I'm pretty new to using Qt and I don't know the "usual" approaches to problems like this, but perhaps a call to QCoreApplication::processEvents within the loop would help.

提交回复
热议问题