<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國際加速解決方案。 廣告
                # QModelIndex Class Reference ## [[QtCore](index.htm) module] 該QModelIndex類用于定位數據的數據模型。[More...](#details) ### Methods * `__init__ (self)` * `__init__ (self, QModelIndex?other)` * `__init__ (self, QPersistentModelIndex)` * `QModelIndex child (self, int?arow, int?acolumn)` * `int column (self)` * `QVariant data (self, int?role?=?Qt.DisplayRole)` * `Qt.ItemFlags flags (self)` * `int internalId (self)` * `object internalPointer (self)` * `bool isValid (self)` * `QAbstractItemModel model (self)` * `QModelIndex parent (self)` * `int row (self)` * `QModelIndex sibling (self, int?arow, int?acolumn)` ### Special Methods * `bool __eq__ (self, QModelIndex?other)` * `bool __ge__ (self, QModelIndex?other)` * `int __hash__ (self)` * `bool __lt__ (self, QModelIndex?other)` * `bool __ne__ (self, QModelIndex?other)` * * * ## Detailed Description 該QModelIndex類用于定位數據的數據模型。 這個類被用作源自一個索引項的模型[QAbstractItemModel](qabstractitemmodel.html)。該指數是由項目的意見,委讬和選擇模型來定位模型中的項目。 新QModelIndex目的是通過使用模型創建的[QAbstractItemModel.createIndex](qabstractitemmodel.html#createIndex)()函數。一個_invalid_模型索引可以用QModelIndex構造函數來構造。參考模型中的頂級項目時無效索引經常被用作父索引。 型號索引參考模型中的項目,并包含所有需要指定在這些模型及其位置的信息。每個索引位于一個給定行和列中,并且可以具有一個父索引;使用[row](qmodelindex.html#row)( )[column](qmodelindex.html#column)()和[parent](qmodelindex.html#parent)( )來獲取這些信息。模型中的每個頂級項目是由不具有父指數模型指數表示 - 在這種情況下,[parent](qmodelindex.html#parent)( )將返回一個無效的模型索引,相當于用的零參數的形式構建的指數[QModelIndex](qmodelindex.html#QModelIndex)( )構造函數。 要獲取是指在模型中的現有項目的模型索引,調用[QAbstractItemModel.index](qabstractitemmodel.html#index)( )所要求的行和列的值,與母公司的模型索引。當提到??在一個模型中,供應頂級項目[QModelIndex](qmodelindex.html#QModelIndex)( )作為主指數。 該[model](qmodelindex.html#model)( )函數返回模型的索引引用作為[QAbstractItemModel](qabstractitemmodel.html)。該[child](qmodelindex.html#child)( )函數用于檢查模型中的指數下舉行的項目。該[sibling](qmodelindex.html#sibling)( )函數允許您遍歷在同一水平作為指標在模型中的項目。 **Note:**型號索引應立即再丟棄使用。你不應該依賴于索引調用該改變模型的結構或刪除項目模型函數后仍然有效。如果你需要保持一個模型索引隨著時間的推移使用[QPersistentModelIndex](qpersistentmodelindex.html)。 * * * ## Method Documentation ``` QModelIndex.__init__ (self) ``` 創建一個新的空模型索引。這種類型的模型索引被用來表示模型中的位置是無效的。 **See also** [isValid](qmodelindex.html#isValid)()和[QAbstractItemModel](qabstractitemmodel.html)。 ``` QModelIndex.__init__ (self, QModelIndex?other) ``` 創建一個新的模型索引是的副本_other_模型索引。 ``` QModelIndex.__init__ (self, QPersistentModelIndex) ``` ``` QModelIndex QModelIndex.child (self, int?arow, int?acolumn) ``` [ 返回該模型索引被存儲在給定的子_row_和_column_。 **Note:**此功能不適用于其經常被用來作為根索引無效的模型索引工作。 ](qmodelindex.html) [**See also**](qmodelindex.html) [parent](qmodelindex.html#parent)()和[sibling](qmodelindex.html#sibling)( ) 。 ``` int QModelIndex.column (self) ``` 返回此模型索引是指該列。 ``` QVariant QModelIndex.data (self, int?role?=?Qt.DisplayRole) ``` 返回數據為給定的_role_該項目由索引引用。 ``` Qt.ItemFlags QModelIndex.flags (self) ``` [ 返回該標志由索引所指的項目。 這個函數中引入了Qt 4.2中。 ``` int QModelIndex.internalId (self) ``` 返回`long`所使用的模型的索引與內部數據結構相關聯。 ](index.htm) [**See also**](index.htm) [QAbstractItemModel.createIndex](qabstractitemmodel.html#createIndex)( ) 。 ``` object QModelIndex.internalPointer (self) ``` 返回`void` `*`指針所使用的模型,以該指數與內部數據結構相關聯。 **See also** [QAbstractItemModel.createIndex](qabstractitemmodel.html#createIndex)( ) 。 ``` bool QModelIndex.isValid (self) ``` 返回True如果這個模型索引是有效的,否則返回False 。 一個有效的指標屬于一個模型,并具有非負的行數和列數。 **See also** [model](qmodelindex.html#model)( )[row](qmodelindex.html#row)()和[column](qmodelindex.html#column)( ) 。 ``` QAbstractItemModel QModelIndex.model (self) ``` [ 返回一個指向包含該指標是指項目的模型。 的常量指針模型返回,因為調用模型的非const函數可能失效模型索引,并可能引起程序崩潰。 ](qabstractitemmodel.html) ``` QModelIndex QModelIndex.parent (self) ``` [](qmodelindex.html) [返回模型索引的父母,或](qmodelindex.html)[QModelIndex](qmodelindex.html#QModelIndex)( ) ,如果它沒有父。 **See also** [child](qmodelindex.html#child)( )[sibling](qmodelindex.html#sibling)()和[model](qmodelindex.html#model)( ) 。 ``` int QModelIndex.row (self) ``` 返回此模型索引是指該行。 ``` QModelIndex QModelIndex.sibling (self, int?arow, int?acolumn) ``` [](qmodelindex.html) [返回在同級_row_和_column_。如果沒有兄弟在這個位置上,??一個無效的](qmodelindex.html)[QModelIndex](qmodelindex.html)返回。 **See also** [parent](qmodelindex.html#parent)()和[child](qmodelindex.html#child)( ) 。 ``` bool QModelIndex.__eq__ (self, QModelIndex?other) ``` ``` bool QModelIndex.__ge__ (self, QModelIndex?other) ``` ``` int QModelIndex.__hash__ (self) ``` ``` bool QModelIndex.__lt__ (self, QModelIndex?other) ``` ``` bool QModelIndex.__ne__ (self, QModelIndex?other) ```
                  <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>

                              哎呀哎呀视频在线观看