<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>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # QHistoryState Class Reference ## [[QtCore](index.htm) module] 該QHistoryState類提供??返回到一個以前的活動子狀態的手段。[More...](#details) 繼承[QAbstractState](qabstractstate.html)。 ### Types * `enum HistoryType { ShallowHistory, DeepHistory }` ### Methods * `__init__ (self, QState?parent?=?None)` * `__init__ (self, HistoryType?type, QState?parent?=?None)` * `QAbstractState defaultState (self)` * `bool event (self, QEvent?e)` * `HistoryType historyType (self)` * `onEntry (self, QEvent?event)` * `onExit (self, QEvent?event)` * `setDefaultState (self, QAbstractState?state)` * `setHistoryType (self, HistoryType?type)` * * * ## Detailed Description 該QHistoryState類提供??返回到一個以前的活動子狀態的手段。 史狀態是一個偽狀態,代表該子狀態的父狀態是在最后時刻父狀態中退出。與歷史狀態為目標的過渡實際上是在父狀態的其他子狀態的一個過渡。 QHistoryState是一部分[The State Machine Framework](index.htm)。 使用[setDefaultState](qhistorystate.html#defaultState-prop)( )函數來設置,如果父狀態從來沒有進入應該進入狀態。例如: ``` [QStateMachine](qstatemachine.html) machine; [QState](qstate.html) *s1 = new [QState](qstate.html)(); [QState](qstate.html) *s11 = new [QState](qstate.html)(s1); [QState](qstate.html) *s12 = new [QState](qstate.html)(s1); QHistoryState *s1h = new QHistoryState(s1); s1h->setDefaultState(s11); machine.addState(s1); [QState](qstate.html) *s2 = new [QState](qstate.html)(); machine.addState(s2); [QPushButton](qpushbutton.html) *button = new [QPushButton](qpushbutton.html)(); // Clicking the button will cause the state machine to enter the child state // that s1 was in the last time s1 was exited, or the history state's default // state if s1 has never been entered. s1->addTransition(button, SIGNAL(clicked()), s1h); ``` 默認情況下,歷史狀態很淺,這意味著它不會記得嵌套狀態。這可以通過配置[historyType](qhistorystate.html#historyType-prop)屬性。 * * * ## Type Documentation ``` QHistoryState.HistoryType ``` 此枚舉指定的歷史類型,一個[QHistoryState](qhistorystate.html)記錄。 | Constant | Value | Description | | --- | --- | --- | | `QHistoryState.ShallowHistory` | `0` | 只有父狀態的直接子狀態被記錄下來。在這種情況下,與歷史狀態為目標的過渡最終會在父是在上一次被退出的直接子狀態。這是默認的。 | | `QHistoryState.DeepHistory` | `1` | 嵌套狀態被記錄下來。在這種情況下,與歷史狀態為目標的過渡將結束在最深層的后代狀態母公司是在上次被退出。 | * * * ## Method Documentation ``` QHistoryState.__init__ (self, QState?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個新的淺歷史狀態與給定_parent_狀態。 ``` QHistoryState.__init__ (self, HistoryType?type, QState?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造的賦予了新的歷史狀態_type_用給定的_parent_狀態。 ``` QAbstractState QHistoryState.defaultState (self) ``` [ ``` bool QHistoryState.event (self, QEvent?e) ``` ](qabstractstate.html) [從重新實現](qabstractstate.html)[QObject.event](qobject.html#event)( ) 。 ``` HistoryType QHistoryState.historyType (self) ``` [ ``` QHistoryState.onEntry (self, QEvent?event) ``` ](qhistorystate.html#HistoryType-enum) [從重新實現](qhistorystate.html#HistoryType-enum)[QAbstractState.onEntry](qabstractstate.html#onEntry)( ) 。 ``` QHistoryState.onExit (self, QEvent?event) ``` 從重新實現[QAbstractState.onExit](qabstractstate.html#onExit)( ) 。 ``` QHistoryState.setDefaultState (self, QAbstractState?state) ``` ``` QHistoryState.setHistoryType (self, HistoryType?type) ```
                  <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>

                              哎呀哎呀视频在线观看