Do you want to know how your customers use your applications and devices? Try Qt Insight Beta.
最新版Qt 6.3已正式发布。 了解更多。
最新バージョンQt 6.3がご利用いただけます。 詳細はこちら

QtScript Bindings for Animations & States Classes

As Eskil recently mentioned, the Animations & States classes are now part of qt/master. To celebrate, I've added some QtScript bindings for said classes to the QtScript generator project on gitorious; they can be found in the 4.6 branch.

Since the C++ classes have been designed with scriptability and declarative usage in mind, the bindings already seem to work pretty well. There's an example, AnimatedBox, showing basic usage of the APIs (gotta love that InOutElastic easing curve!).

While I'm here, I'd like to mention a nice little property that we added to QStateMachine: animationsEnabled. Set this property to false, and all animations for property changes will be disabled, i.e. all properties will be set immediately on state transitions. Useful for debugging (no animations that get in the way of the app logic), and when you get tired of all the bling.

Blog Topics: