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

String methods not recognizable for character in QML function

    XMLWordPrintable

Details

    Description

      Methods like toLowerCase() works for string but not character, got warning:"Member "toLowerCase" not found on type QJSPrimitiveValue [missing-property]"
      Snippet to reproduce the issue:

       

      import QtQuick 
      Window {
          id: window
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          Component.onCompleted:
          {
              let s = "hello"
              console.log(s[0].toLowerCase())
              //console.log(s.toLowerCase()) // this is fine 
          }
      }
      

       

       

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            kitruong Kinh Truong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes