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

[REG 5.4 - 5.5] QtQuick: Decimal value cannot be correctly set to string parameter

    XMLWordPrintable

    Details

    • Commits:
      a9276971aa8018837b23a847b5dee3b63b39232e

      Description

      If you have a string property in the QtQuick component and you try to set a decimal value to it in JavaScript, it is set validly to an approximate of the value. For example if you set value 3.4 to a string as

      property string myString
      ...
      onSomeSignalHandler: myString = 3.4
      

      the value of myString is 3.3999999999999999. And for example with 1.1 the value is 1.1000000000000001.

      The problem is not reproducible in Qt 5.4.2.

      An example attached to reproduce the problem.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                ulherman Ulf Hermann
                Reporter:
                qtcomsupport Qt Support
              • Votes:
                2 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes