Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 in your design. What do you think?

Thanks

like image 741
Daniel Avatar asked Oct 13 '10 13:10

Daniel


1 Answers

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.

like image 138
liaK Avatar answered Sep 20 '22 00:09

liaK