Blocked waiting for a asynchronous Qt signal

前端 未结 3 407
小蘑菇
小蘑菇 2020-12-24 07:22

I know, there are some similar questions to the following out there, but I couldn\'t find a concrete answer that helps me. So here\'s my problem:

I work on an applic

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-24 08:07

    Another solution could be to use QSignalSpy::wait(). This function was introduced in Qt 5 and does exactly what you want.

    The only problem I see with that class is that it is provided in the QtTest module. In my case I find it very useful when testing code, but it might be not the best solution for production code.

提交回复
热议问题