Well, I have been a new to Qt and I am now using signals and slots. I would like to define a signal
void send(int);
and emit this signal in A.cpp with some int val like '5'
emit send(5);
After that, in B.h, I defined a slot
void receive(int i);
Using the connect function, I connect the signal and slot
connect(a,&a::send,b,&receive);
Then this two just connected and the int value 5 was transferred successfully to slot receive. It can also been used in the area of receive. But what troubles me is, how can I acquire this value or this '5' and use it outside receive function. I am stuck in this step for days, so I wish someone could give me some ideas or instruction, thanks alot.