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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # QDBusPendingCallWatcher Class Reference ## [[QtDBus](index.htm) module] 該QDBusPendingCallWatcher類提供了一個便捷的途徑等待異步回復[More...](#details) 繼承[QObject](qobject.html)和[QDBusPendingCall](qdbuspendingcall.html)。 ### Methods * `__init__ (self, QDBusPendingCall?call, QObject?parent?=?None)` * `bool isFinished (self)` * `waitForFinished (self)` ### Qt Signals * `void finished (QDBusPendingCallWatcher *)` * * * ## Detailed Description 該QDBusPendingCallWatcher類提供了一個便捷的途徑等待異步回復 該QDBusPendingCallWatcher提供[finished](qdbuspendingcallwatcher.html#finished)( )信號,當回復到達將要發射。 它通常用于像下面的例子: ``` [QDBusPendingCall](qdbuspendingcall.html) async = iface->asyncCall("RemoteMethod", value1, value2); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(async, this); [QObject](qobject.html).connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(callFinishedSlot(QDBusPendingCallWatcher*))); ``` 注意,這是沒有必要的,以保持原始[QDBusPendingCall](qdbuspendingcall.html)對象周圍因為QDBusPendingCallWatcher從該類繼承了。 通過上面的代碼連接到插槽中可能出現類似下面的內容: ``` void MyClass.callFinishedSlot(QDBusPendingCallWatcher *call) { [QDBusPendingReply](qdbuspendingreply.html)<[QString](qstring.html), [QByteArray](qbytearray.html)> reply = *call; if (reply.isError()) { showError(); } else { [QString](qstring.html) text = reply.argumentAt<0>(); [QByteArray](qbytearray.html) data = reply.argumentAt<1>(); showReply(text, data); } call->deleteLater(); } ``` 使用注意事項[QDBusPendingReply](qdbuspendingreply.html)驗證在回復的參數類型。如果回復并不恰好包含兩個參數(一個字符串和一個[QByteArray](qbytearray.html)) ,[QDBusPendingReply.isError](qdbuspendingreply.html#isError)( )將返回True 。 * * * ## Method Documentation ``` QDBusPendingCallWatcher.__init__ (self, QDBusPendingCall?call, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 創建[QDBusPendingCallWatcher](qdbuspendingcallwatcher.html)對象,以觀察在異步等待受理回復_call_并設置該對象的父到_parent_。 ``` bool QDBusPendingCallWatcher.isFinished (self) ``` 返回True,如果待處理的呼叫完成處理和回復已經收到。 注意,這個函數只有改變狀態,如果你調用[waitForFinished](qdbuspendingcallwatcher.html#waitForFinished)( ),或者如果外部D-Bus的事件發生,這在一般如果返回到事件循環執行只發生。 **See also** [QDBusPendingReply.isFinished](qdbuspendingreply.html#isFinished)( ) 。 ``` QDBusPendingCallWatcher.waitForFinished (self) ``` 掛起調用線程,直到收到回復和處理的執行。在此之后函數返回,[isFinished](qdbuspendingcallwatcher.html#isFinished)( )應該返回True,表示該回復的內容是準備進行處理。 **See also** [QDBusPendingReply.waitForFinished](qdbuspendingreply.html#waitForFinished)( ) 。 * * * ## Qt Signal Documentation ``` void finished (QDBusPendingCallWatcher *) ``` 這是該信號的默認超載。 這個信號被發射時掛起調用完成,其答復是可用的。該_self_參數是一個指向對象本身,通過為方便起見,這樣的插槽可以訪問屬性,并確定答復的內容。
                  <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>

                              哎呀哎呀视频在线观看