how to simulate returnPressed signal from a QSpinBox
-
wrote on 4 Apr 2015, 13:23 last edited by
You can simply emit signal from another object. E.g. you have pointer to QSpinBox object named spinBox:
emit spinBox->returnPressed();
-
You can simply emit signal from another object. E.g. you have pointer to QSpinBox object named spinBox:
emit spinBox->returnPressed();
wrote on 4 Apr 2015, 17:09 last edited by koahnig 4 Apr 2015, 17:16@kroman
Typically you can call the slots that signal is connected to as long as the slot routines are not private.[edit:koahnig] should checked before.
in the description of signals and slots , you can find:
#SignalsSignals are emitted by an object when its internal state has changed in some way that might be interesting to the object's client or owner. Signals are public access functions and can be emitted from anywhere, but we recommend to only emit them from the class that defines the signal and its subclasses.*
1/2