QT Animation Framework (the Animation framework)

Source: Internet
Author: User
Tags bind
Animation FRAME (the Animation framework)

Author: Liu Xuhui Raymond Reprint Please specify the source
Email:colorant@163.com
blog:http://blog.csdn.net/colorant/

QT Animation Framework is also introduced to QT4.6, it is likely to match the graphics system framework for the next generation of UI to do the bedding category

Personally, in the narrow sense, the Animation framework refers to several related Animation classes with qabstractanimation as the base class, and the main purpose is to animate qwidget/qobject properties.

Slightly more relaxed, also includes Qtimeline, as the name implies, it does not directly bind and modify an object property, but according to the set timeline, send a signal to bind a specific slot, to perform related operations, so should not only animation, but also not limited to properties, You can use it to do whatever you want to do with the timeline.

Secondly, there are qgraphicsitemanimation classes dedicated to Qgraphicsitem, which are mainly combined with qtimeline to control the coordinate transformation matrix of qgraphicsitem.

More broadly, the QT state machine can be bound to set the control properties when the state transitions, you can also think of this as an animation effect, of course, if you do not match a animation class, the property value changes are instantaneous, there is no intermediate animation process.

features Animation Curve

The standard animation class uses linear interpolation to calculate the attribute values of an intermediate procedure by setting the start and end values of the associated property. The Qtimeline class can also set parameter values for any point in the middle. Such animations may not necessarily be what you need: such as simulating a ball's ground bounce. By setting the animation curve (easing Curve), you can make the parameter change process conform to the specific curve law. Associated Animations

If you need to animate a group of objects at the same time, or perform a set of animated effects sequentially on the same object, Qanimationgroup and its subclasses provide the ability to perform the animation in parallel/serially, and you can get a more complex sequence of animation executions by combining overlays.

state Machine Driver

You can also drive animations through the state machine (Qstate Class).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.