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

if condition unexpected evaluation in QML

    XMLWordPrintable

Details

    Description

      if block is evaluated to true if a number or a string is appended at the end of the condition.

      Snippet to reproduce the issue:

       

      Window {
          visible: true
          width: 300
          height: 200  
      
          Component.onCompleted: {
              if (false) 0
              {
                  console.log("hello")
              }
          }
      }
      

       

      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:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes