Qt signal slot same class

broken image

Maybe take a look here for some qml example which shows you how to communicate with qmlĪnd another thing to remember is that slots can have return values, while signals can't.īut that's about it, you simply 'connect' the signals/slots and then invoke/emit them by using the uppercase version of you function ( InSlot() in this case)Īwesome, thank you very much for your answer.

broken image

The differentiation between signals/slots is now only important if you work with qml and you want to listen on a signal in qml (to receive go function calls) or if you want to call a go function (slot) from qml.

broken image

In c++ 'connecting' a slot is basically overriding a virtual function, while connecting a signal is like you said connecting a signal to some slot.īut this is all abstracted away for you when you make use of ConnectXYZ, so you can just use ConnectXYZ regardless if you want to override a slot or connect a signal to some slot.

broken image

No, you are right the binding somewhat blurs the lines between signals/slots so that they are practically indistinguishable from one another.

broken image