Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SpinBox Wheel Event
Qt 6.11 is out! See what's new in the release blog

SpinBox Wheel Event

Scheduled Pinned Locked Moved QML and Qt Quick
4 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    How can I detect that SpinBox's value changed by the user rather than the program, and how can I catch the wheel event when SpinBox's value changed with a mouse wheel?

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      It has "value":http://qt-project.org/doc/qt-5/qml-qtquick-controls-spinbox.html#value-prop property so you can use onValueChanged handler.

      157

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hi,
        It is invoked even when the value is changed by the program, and it doesn't have any properties to get the way the value changes (mouse wheel, table model or keyboard)

        1 Reply Last reply
        0
        • p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          There's no direct way to get these but as a workaround for the mouse wheel you could define a MouseArea for the Spinbox and then use onWheel to detect changes by MouseWheel. You will need a flag to hold this change.

          157

          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