<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # QPropertyAnimation Class Reference ## [[QtCore](index.htm) module] 該QPropertyAnimation類動畫Qt的屬性[More...](#details) 繼承[QVariantAnimation](qvariantanimation.html)。 ### Methods * `__init__ (self, QObject?parent?=?None)` * `__init__ (self, QObject?target, QByteArray?propertyName, QObject?parent?=?None)` * `bool event (self, QEvent?event)` * `QByteArray propertyName (self)` * `setPropertyName (self, QByteArray?propertyName)` * `setTargetObject (self, QObject?target)` * `QObject targetObject (self)` * `updateCurrentValue (self, QVariant?value)` * `updateState (self, QAbstractAnimation.State?newState, QAbstractAnimation.State?oldState)` * * * ## Detailed Description 該QPropertyAnimation類動畫Qt的屬性 QPropertyAnimation插過[Qt properties](index.htm#qt-s-property-system)。作為屬性值被存儲在[QVariant](qvariant.html)s時,類繼承[QVariantAnimation](qvariantanimation.html),并支持相同的動畫[variant types](qvariant.html#Type-enum)作為它的超類。 一個類聲明的屬性必須是一個[QObject](qobject.html)。為了能夠對屬性進行動畫,它必須提供一個setter (這樣QPropertyAnimation可以設置該屬性的值) 。請注意,這使得它可以制作動畫的許多Qt的部件。讓我們來看一個例子: ``` QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry"); animation->setDuration(10000); animation->setStartValue([QRect](qrect.html)(0, 0, 100, 30)); animation->setEndValue([QRect](qrect.html)(250, 250, 100, 30)); animation->start(); ``` 屬性名和[QObject](qobject.html)例如其中的屬性應該是動畫傳遞給構造函數。然后,您可以指定屬性的開始和結束值。該過程是相等的,您已經實現自己的類的屬性 - 只是檢查與[QVariantAnimation](qvariantanimation.html)您[QVariant](qvariant.html)被支持的類型。 該[QVariantAnimation](qvariantanimation.html)類的描述解釋了如何設置動畫的細節。但是請注意,如果一開始未設定值,該屬性將開始在它有創建QPropertyAnimation實例時的值。 QPropertyAnimation就像對自己的魅力。對于復雜的動畫,例如,包含多個對象,[QAnimationGroup](qanimationgroup.html)提供。動畫組是一個可以包含其他動畫的動畫,并且可以管理其時的動畫播放。看[QParallelAnimationGroup](qparallelanimationgroup.html)的一個例子。 * * * ## Method Documentation ``` QPropertyAnimation.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構建[QPropertyAnimation](qpropertyanimation.html)對象。_parent_被傳遞給[QObject](qobject.html)的構造。 ``` QPropertyAnimation.__init__ (self, QObject?target, QByteArray?propertyName, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構建[QPropertyAnimation](qpropertyanimation.html)對象。_parent_被傳遞給[QObject](qobject.html)的構造。動畫更改屬性_propertyName_上_target_。默認的持續時間為250ms 。 **See also** [targetObject](qpropertyanimation.html#targetObject-prop)和[propertyName](qpropertyanimation.html#propertyName-prop)。 ``` bool QPropertyAnimation.event (self, QEvent?event) ``` 從重新實現[QObject.event](qobject.html#event)( ) 。 ``` QByteArray QPropertyAnimation.propertyName (self) ``` [ ``` QPropertyAnimation.setPropertyName (self, QByteArray?propertyName) ``` ``` QPropertyAnimation.setTargetObject (self, QObject?target) ``` ](qbytearray.html) ``` QObject QPropertyAnimation.targetObject (self) ``` [ ``` QPropertyAnimation.updateCurrentValue (self, QVariant?value) ``` ](qobject.html) [從重新實現](qobject.html)[QVariantAnimation.updateCurrentValue](qvariantanimation.html#updateCurrentValue)( ) 。 這個虛函數被調用[QVariantAnimation](qvariantanimation.html)每當電流值的變化。_value_是新的,更新后的值。它更新的目標對象上的屬性的當前值。 **See also** [currentValue](qvariantanimation.html#currentValue-prop)和[currentTime](qabstractanimation.html#currentTime-prop)。 ``` QPropertyAnimation.updateState (self, QAbstractAnimation.State?newState, QAbstractAnimation.State?oldState) ``` 從重新實現[QAbstractAnimation.updateState](qabstractanimation.html#updateState)( ) 。 如果[startValue](qvariantanimation.html#startValue-prop)沒有定義時,從停止到運行的動畫變化的狀態,當前的屬性值作為動畫的初始值。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看