Signal one slot from two slot properties of the same object

43 views
asked Mar 18 in GUI Development by rscr

Hi, 

I would like to signal the same slot (updateHoldingRegisters) from two Slot properties of the same object (FancoilSpeed, OnTempReferenceUpdate):

And then, on updateHoldingRegisters, I would like to know who has signaled the slot method, something like:

if(sender == Thermostat.FancoilSpeedSelector){

     //do something

}else if(sender == Thermostat.OnTempReferenceUpdate){

     //do something
}

But using sender is not working. 

How could achieve this?

Kind Regards, 

Rafa

1 Answer

0 votes
answered Mar 18 by Paul Banach

Hello Rafa,

I suppose the signal is sent by another object existing within FrancoilSpeedSelector, etc. To see who is the true sender of a signal add following statement to your slot method and test it in prototyper:

trace sender;

The statement trace prints outputs on the Log window.

Can you verify this?

Best regards

Paul Banach

commented Mar 20 by rscr
Hi Paul,

Ok I will try and post the results.

Kind Regards,

Rafa

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...