Can Qt signals return a value?

后端 未结 5 1665
执念已碎
执念已碎 2020-12-03 04:35

Boost.Signals allows various strategies of using the return values of slots to form the return value of the signal. E.g. adding them, forming a vector out of th

5条回答
  •  情话喂你
    2020-12-03 04:51

    No, they can't.

    Boost::signals are quite different from those in Qt. The former provide an advanced callback mechanism, whereas the latter implement the signaling idiom. In the context of multithreading, Qt's (cross-threaded) signals depend on message queues, so they are called asynchronously at some (unknown to the emitter's thread) point in time.

提交回复
热议问题