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

Doing onDoubleClicked : { text.horizontalAlignment = AlignHCenter;} doesn't display a warning

    XMLWordPrintable

Details

    Description

      The proper QML code should be :

      onDoubleClicked :

      { text.horizontalAlignment = TextInput.AlignHCenter; }

      It assigns undefined to horizontalAlignment and it should probably display a warning.

      import Qt 4.6
      
      Rectangle {
         color : "red"
         width : 300
         height : 300
         Rectangle {
             color : "white"
             x : 70
             y : 70
             width : 100
             height : 50
             TextInput {
                 id : text
                 anchors.fill : parent
             }
        }
        MouseArea {
            width : 50
            height : 50
            onDoubleClicked : { text.horizontalAlignment = AlignHCenter; console.log("DoubleClicked");}
        }
      }
      

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            menard Alexis Menard (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes