Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-31262

Slider: formatValue behavior does not match documentation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.1.0 Beta 1
    • Fix Version/s: 5.1.0 RC1
    • Component/s: Quick: Controls 1
    • Labels:
      None
    • Commits:
      qtquickcontrols/release: 6de2c97d064daa069066bb46880f04bfd5be43b7

      Description

          /*!
              \qmlmethod Slider::formatValue
      
              This method returns the current slider value in a way that is more suitable
              for user display, such as the \l value rounded to only two decimal places.
      
              By default this function returns the nearest \c int value.
          */
      
          function formatValue(v) {
              return Math.round(v);
          }
      

      formatValue will always return a int. It should also round to for example 2 decimals.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            carochao Caroline Chao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes