Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] QSpinBox: how to signal only when editing finished?
QtWS25 Last Chance

[Solved] QSpinBox: how to signal only when editing finished?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 12.6k Views
  • 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.
  • C Offline
    C Offline
    calberto
    wrote on last edited by
    #1

    QSpinBox normally emit signal valueChanged(int) for each key stroke, so if I want to insert "123", I receive 3 signals for 1, 12 and 123. I need to known when the user has completed the input, so to receive only one signal for the complete number 123.

    I known I can connect to the signal editingFinisched(), but this only partially resolve my problem since I also want to be signaled even when the user step up/down (this is considered a "complete" input) and if I setValue() programmaticly.

    How can I do that?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tony
      wrote on last edited by
      #2

      Hi,

      just switch off "keyboardTracking":http://doc.qt.nokia.com/4.7/qabstractspinbox.html#keyboardTracking-prop

      Tony.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        calberto
        wrote on last edited by
        #3

        Thanks, it is exactly what I need. And sorry, it could be found in the documentation but I really miss the point while looking for a solution (too much concentrated on signals and slots)

        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 Extensions
        • Unsolved