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

Little mistake in example

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes