Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Get spinbox cursor position
Forum Updated to NodeBB v4.3 + New Features

Get spinbox cursor position

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 790 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.
  • V Offline
    V Offline
    VictorClaessen
    wrote on last edited by
    #1

    Hi,

    TL;DR Can I request a feature? That QAbstractSpinBox be expanded to expose the cursor position.

    I am trying to make a QDoubleSpinBox that behaves as a Numerical Control in LabVIEW would.

    Allow me to explain: In the LabView UI, the amount to increment/decrement is dependent on the position of the cursor. Consider a value of "10.2". If the cursor is on the decimal 2, then an incremental step would be 0.1; if it was on the 0 the value would be incremented by 1; and finally if the cursor position was on the 10, the value would be incremented by 10.

    If this behavior were added to QT, the most logical place for it would be perhaps the stepType property of the QDoubleSpinBox, but that would require someone to create a new stepType for the spinbox, and I am not qualified to do that.
    However, I feel confident of my ability to achieve this if the cursor position inside the spinbox would be available to me. So that is the background of my feature request.

    If there is another way to accomplish the same thing, please let me know!

    Thanks,

    Victor

    jsulmJ 1 Reply Last reply
    0
    • V VictorClaessen

      Hi,

      TL;DR Can I request a feature? That QAbstractSpinBox be expanded to expose the cursor position.

      I am trying to make a QDoubleSpinBox that behaves as a Numerical Control in LabVIEW would.

      Allow me to explain: In the LabView UI, the amount to increment/decrement is dependent on the position of the cursor. Consider a value of "10.2". If the cursor is on the decimal 2, then an incremental step would be 0.1; if it was on the 0 the value would be incremented by 1; and finally if the cursor position was on the 10, the value would be incremented by 10.

      If this behavior were added to QT, the most logical place for it would be perhaps the stepType property of the QDoubleSpinBox, but that would require someone to create a new stepType for the spinbox, and I am not qualified to do that.
      However, I feel confident of my ability to achieve this if the cursor position inside the spinbox would be available to me. So that is the background of my feature request.

      If there is another way to accomplish the same thing, please let me know!

      Thanks,

      Victor

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @VictorClaessen said in Get spinbox cursor position:

      Can I request a feature?

      The place for that is https://bugreports.qt.io/secure/Dashboard.jspa

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VictorClaessen
        wrote on last edited by
        #3

        Thanks, I will request it there. If in the meantime someone has a workaround, please let me know.

        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