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

Little mistake in example

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • Icon: P4: Low P4: Low
    • 5.4.0
    • None
    • Documentation
    • Linux. Debian 64 bits. Gnome. Qt 5.3.1.

      I think in this example (found on http://qt-project.org/doc/qt-5/qmlfirststeps.html#animations) there is a mistake:

      Rectangle {
      color: "lightgray"
      width: 200
      height: 200

      property int animatedValue: 0
      SequentialAnimation on animatedValue {
      loops: Animation.Infinite
      PropertyAnimation

      { to: 150; duration: 1000 }

      PropertyAnimation

      { to: 0; duration: 1000 }

      }

      Text

      { anchors.centerIn: parent text: animatedValue }

      }

      “text: animatedValue” should be “text: parent.animatedValue”. Another option could be add an id in Rectangle and use it in Text (i.e. myrect.animatedValue)

      If I run this example in Qt, the rectangle doesn't show any text unless I change that line of code.

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

            kdpalara Kavindra Palaraja
            tarod.net Frank Tena
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes