开发者

In Qt (4.6), is it ok to call slots directly?

开发者 https://www.devze.com 2023-01-20 06:38 出处:网络
I found myself in the need of having to call a slot directly. I think it\'s perfectly fine doing it as long as it makes sense i开发者_高级运维n your design. What do you think?

I found myself in the need of having to call a slot directly. I think it's perfectly fine doing it as long as it makes sense i开发者_高级运维n your design. What do you think?

Thanks


Yes.. Slots are just normal functions and you can call them directly..

From docs,

A slot is called when a signal connected to it is emitted. Slots are normal C++ functions and can be called normally; their only special feature is that signals can be connected to them.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号