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. QDial - don't use for fine control ..
Forum Updated to NodeBB v4.3 + New Features

QDial - don't use for fine control ..

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 652 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.
  • D Offline
    D Offline
    David King
    wrote on last edited by David King
    #1

    Hi,

    If you specify a singleStep that is less than 1/32768 of the specified minimum to maximum range,
    then dial can freeze midsweep, on using uparrow or downarrow

    Seems, on adding or subtracting singleStep to the position, it rounds back to where it was
    Meaning, the dial can get stuck, at a seeming random but repeatable position

    Here's an example:

    minimum -12500 maximum 37500 singleStep 1

    Starting from position 0, try using uparrow
    It will get stuck at 410 :-/

    Via another control, you can enter a value that takes it past 410
    And then, reverse back through 410 with downarrow, without issue

    But when you try going forward again, with uparrow, again it sticks at 410

    Anyway, just one to be aware of: Don't try using QDial for very fine control ..

    Best regards,

    David

    1 Reply Last reply
    1
    • Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @David-King what if you use two separate dial controls, one for "coarse" control of the value (let's say "unit") and another control for "fine" control (let's say fractions of the unit). This approach was implemented long time ago in actual instruments.

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • D Offline
        D Offline
        David King
        wrote on last edited by David King
        #3

        Hi Pablo,

        Great idea there ..

        As happens, the same thought occurred to me on drive into work this morning :-)
        And I know that used to be done on eg scientific instruments and high end HiFi's

        For our application though, I'd quite like to keep the UI as simple and approachable as I can
        A single dial, fits the bill - and the 3 speed levels afforded by the following keys, suffice :

        Up/Down keys for slow
        PgUp/PgDn keys for medium
        End/Home keys for fast - see also my https://forum.qt.io/topic/86811/taming-qdial post :-)

        Together with, the linear accelerating limit, applied to motion, key or mouse initiated,
        provides for a single dial, with fine through to coarse control..

        What is really needed, I think, is for the QAbstractSlider author, to widen the internal position variable,
        from int16_t to int32_t :-)

        Or perhaps, to provide the option: an added fineControl false/true property, that selects int16_t / int32_t
        Or always int32_t, but zeroes the low 16 bits if false
        Default false, to sidestep any existing app compatibility issues ..

        About the mentioned post, I'll update it in due course, to add the option of linear or exponential.
        Latter confers a nicely weighted dial, I think ..

        And change my CamelCase to javaCase, I'm new to ..

        @JKSH: thanks for the upvote

        Best regards,

        David

        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