how to simulate returnPressed signal from a QSpinBox



  • You can simply emit signal from another object. E.g. you have pointer to QSpinBox object named spinBox:

    emit spinBox->returnPressed();


  • Moderators

    @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:
    #Signals

    Signals 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.*


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.