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

Slider: formatValue behavior does not match documentation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.1.0 RC1
    • 5.1.0 Beta 1
    • Quick: Controls 1
    • None
    • 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

            Unassigned Unassigned
            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