[Qt-interest] block signals only in current class

Matthias Pospiech matthias.pospiech at gmx.de
Tue Aug 11 10:33:11 CEST 2009


I have a class (RotationStage) that has a variable 'velocity'. The class 
is a Singleton.

This velocity can be changed in different classes and is displayed in 
different dialogs.
If the velocity is changed with
RotationStage->setVelocity(velocity)
then RotationStage emits 'velocity changed', so that all dialogs can 
update their velocity displays.

However, I want to avoid that the signal of RotationStage changes the 
QDoubleSpinBox, that originaly
changed the velocity value. But if I would block the Signals from 
RotationStage "RotationStage->blockSignals(true);",
that would stop every dialog from getting this signal which is not what 
I want.

Or do this signals apply only to my class despite that RotationStage is 
a Singleton?

Matthias




More information about the Qt-interest-old mailing list