Can Qt signals return a value?

后端 未结 5 1660
执念已碎
执念已碎 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:47

    You can try to workaround this with following:

    1. All your connected slots must save their results in some place (container) accessible from signaling object
    2. The last connected slot should somehow (select max or last value) process collected values and expose the only one
    3. The emitting object can try to access this result

    Just as an idea.

提交回复
热议问题