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

QML properties are not JavaScript type-compatible

    XMLWordPrintable

Details

    Description

      Thinking I was prudent by using JavaScript's tripple-equal, I found the property
      types available in QML are not JS type-compatible.

      property bool testBool: true
      MouseArea {
          anchors.fill: parent
          onClicked: {
              if( testBool === true )
                  print("True!");
              else if( testBool === false )
                  print("False!");
              else
                  print("Unknown!")
          }
      }
      

      Same thing is true for built-in properties (e.g. replace "testBool" above with "pressed").

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes