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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # QRunnable Class Reference ## [[QtCore](index.htm) module] 該QRunnable類是可運行的所有對象的基類。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, QRunnable)` * `bool autoDelete (self)` * `run (self)` * `setAutoDelete (self, bool?_autoDelete)` * * * ## Detailed Description 該QRunnable類是可運行的所有對象的基類。 該QRunnable類是用于表示一個任務或一段代碼需要被執行,您的代表重新實現一個接口[run](qrunnable.html#run)()函數。 您可以使用[QThreadPool](qthreadpool.html)執行你的代碼在一個單獨的線程。[QThreadPool](qthreadpool.html)自動刪除QRunnable如果[autoDelete](qrunnable.html#autoDelete)( )返回True (默認值) 。使用[setAutoDelete](qrunnable.html#setAutoDelete)()來更改自動刪除標志。 [QThreadPool](qthreadpool.html)支持執行相同QRunnable不止一次通過從內主叫QThreadPool.tryStart (本)[run](qrunnable.html#run)()函數。如果autoDelete時啟用的最后一個線程退出運行功能的QRunnable將被刪除。調用[QThreadPool.start](qthreadpool.html#start)( )多次使用時autoDelete啟用相同的QRunnable創造競爭條件,因此不推薦。 * * * ## Method Documentation ``` QRunnable.__init__ (self) ``` 構造一個[QRunnable](qrunnable.html)。自動刪除默認情況下啟用。 **See also** [autoDelete](qrunnable.html#autoDelete)()和[setAutoDelete](qrunnable.html#setAutoDelete)( ) 。 ``` QRunnable.__init__ (self, QRunnable) ``` ``` bool QRunnable.autoDelete (self) ``` 返回True為自動刪除被啟用,否則為False 。 如果自動刪除已啟用,[QThreadPool](qthreadpool.html)在調用后自動刪除此可運行[run](qrunnable.html#run)( ),否則,所有權仍屬于該應用程序的程序員。 **See also** [setAutoDelete](qrunnable.html#setAutoDelete)()和[QThreadPool](qthreadpool.html)。 ``` QRunnable.run (self) ``` 這種方法是抽象的,應在任何子類中重新實現。 在子類實現這個純虛函數。 ``` QRunnable.setAutoDelete (self, bool?_autoDelete) ``` 啟用自動刪除,如果_autoDelete_為True,否則自動刪除被禁用。 如果自動刪除已啟用,[QThreadPool](qthreadpool.html)在調用后自動刪除此可運行[run](qrunnable.html#run)( ),否則,所有權仍屬于該應用程序的程序員。 請注意,此標志必須在調用之前設置[QThreadPool.start](qthreadpool.html#start)( ) 。后調用此函數[QThreadPool.start](qthreadpool.html#start)( )產生不確定的行為。 **See also** [autoDelete](qrunnable.html#autoDelete)()和[QThreadPool](qthreadpool.html)。
                  <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>

                              哎呀哎呀视频在线观看