Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

  • Qt 4.8
  • NumberAnimation QML Element

NumberAnimation QML Element

TheNumberAnimation element animates changes in qreal-type values.More...

Since: Qt 4.7
Inherits:

PropertyAnimation

Inherited By:

SmoothedAnimation andSpringAnimation

Properties

Detailed Description

NumberAnimation is a specializedPropertyAnimation that defines an animation to be applied when a numerical value changes.

Here is aNumberAnimation applied to thex property of aRectangle as a property value source. It animates thex value from its current value to a value of 50, over 1000 milliseconds:

import QtQuick 1.0Rectangle {width:100;height:100color:"red"    NumberAnimation onx {to:50;duration:1000 }}

Like any other animation element, aNumberAnimation can be applied in a number of ways, including transitions, behaviors and property value sources. TheQML Animation and Transitions documentation shows a variety of methods for creating animations.

Note thatNumberAnimation may not animate smoothly if there are irregular changes in the number value that it is tracking. If this is the case, useSmoothedAnimation instead.

See alsoQML Animation and Transitions and Animation basics example.

Property Documentation

from :real

This property holds the starting value for the animation.

For example, the following animation is not applied until thex value has reached 100:

Item {states: [// ...    ]transition:Transition {NumberAnimation {properties:"x";from:100;duration:200 }    }}

If theNumberAnimation is defined within aTransition orBehavior, this value defaults to the value defined in the starting state of theTransition, or the current value of the property at the moment theBehavior is triggered.

See alsoQML Animation and Transitions.


to :real

This property holds the end value for the animation.

If theNumberAnimation is defined within aTransition orBehavior, this value defaults to the value defined in the end state of theTransition, or the value of the property change that triggered theBehavior.

See alsoQML Animation and Transitions.


© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp