Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to simulate returnPressed signal from a QSpinBox
Qt 6.12 LTS is out! See what's new in the release blog

how to simulate returnPressed signal from a QSpinBox

Scheduled Pinned Locked Moved General and Desktop
qspinboxsignal
2 Posts 2 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kroman
    wrote on last edited by
    #1

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

    emit spinBox->returnPressed();

    K 1 Reply Last reply
    0
    • K kroman

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

      emit spinBox->returnPressed();

      K Offline
      K Offline
      koahnig
      wrote on last edited by koahnig
      #2

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

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved