Results 1 to 2 of 2

Thread: QSpinBox Check How Value Is Set

  1. #1
    Join Date
    Aug 2019
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default QSpinBox Check How Value Is Set

    Is there a way to check if the value was set manually (i.e. the user typed in a value) or if it was set from the up/down step button being pressed?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QSpinBox Check How Value Is Set

    The valueChanged() signal will always be emitted when the value changes, not matter how it is being changed.

    Depending on your goal you might find it more appropriate to connect to the editingFinished() signal instead or additionally.

    Cheers,
    _

Similar Threads

  1. Replies: 3
    Last Post: 15th February 2017, 10:57
  2. QSpinBox
    By ToddAtWSU in forum Qt Programming
    Replies: 10
    Last Post: 1st September 2012, 04:36
  3. QSpinbox
    By Markus_AC in forum Qt Programming
    Replies: 8
    Last Post: 20th October 2011, 12:26
  4. QSpinBox on_valueChanged
    By martinb0820 in forum Qt Programming
    Replies: 3
    Last Post: 15th December 2008, 03:31
  5. QSpinbox
    By sonuani in forum Newbie
    Replies: 3
    Last Post: 21st March 2008, 11:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.