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

Can't use Locale type in QQmlExpression

    XMLWordPrintable

    Details

      Description

      See the workaround done here:

      https://codereview.qt-project.org/c/qt/qtdeclarative/+/335964/4..5

      It's not possible to evaluate the following QQmlExpression:

      locale.formattedDataSize(1000000, 3, Locale.DataSizeIecFormat)
      

      in this context:

      https://code.qt.io/cgit/qt/qtdeclarative.git/tree/tests/auto/qml/qqmllocale/data/functions.qml?id=b3567c177f231f28e8bee32d54263b24148c722b

      I've tried removing import version numbers and adding import QtQml, but neither helped.

      Minimal example attached.

        Attachments

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

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes