Problem with signals and slots
Hello,
I have got signal: filtering(Element send,QCString& msg) and slot: filtering(Element& send,QCString& msg) (notice there is & after Element), and I want to modify send variable. But when I connect this signal to slot, this slot is never run. When I remove "&" slot runs. How to solve this problem?
Re: Problem with signals and slots
Quote:
Originally Posted by conexion2000
I have got signal: filtering(Element send,QCString& msg) and slot: filtering(Element& send,QCString& msg) (notice there is & after Element), and I want to modify send variable. But when I connect this signal to slot, this slot is never run. When I remove "&" slot runs. How to solve this problem?
The parameter types must match exactly. If you want a reference, the signal should also emit a reference.
signal: void filtering(Element& send, QString& msg)
slot: void filtering(Element& send, QString& msg)
Re: Problem with signals and slots
Turn the first parameter of the signal into a reference. The signatures of both the signal and the slot have to match.