Delayed Animations/fa

From Qt Wiki
Jump to navigation Jump to search
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

فارسی English Spanish Italian French 日本語 Български Русский

Delayed Animations انیمیشن های تاخیری

آیا تا بحال خواسته اید که کاربر روی چیزی کلیک کند و سپس یک سری از اتفاقات تاخیری نمایش داده شوند؟برای مثال وقتی که یک لیست باز میشود و دوباره بسته می شود؟

مثال بالا با یک دایره قرمز شروع می شود . وقتی که کاربر روی دایره کلیک میکند دایره شروع به حرکت داخل مستطیل می کند و تایمر نیز شروع به حرکت می کند.وقتی که تایمر حرکت می کند مستطیل دوباره شروع به حرکت داخل دایره می کند.

import QtQuick 1.0

Rectangle {
 property int time: 800
 property int size: 300
 width: size; height: size; radius: size
 color: "red"
 Behavior on radius { NumberAnimation { duration: time } }
 Timer {
 id: reset
 interval: time;
 onTriggered: parent.radius = size
 }

MouseArea {
 anchors.fill: parent
 onClicked: {
 parent.radius = 0;
 reset.start()
 }
 }
}

توجه داشته باشید که اگر شما فقط می خواهید که انیمیشن مستقیم حرکت کند بعد از حرکت قبلیش شما می توانید از انیمیشن های ترتیبی استفاده کنید.