<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國際加速解決方案。 廣告
                # QStringListModel Class Reference ## [[QtGui](index.htm) module] 該QStringListModel類提供了一個模型,它提供字符串的看法。[More...](#details) 繼承[QAbstractListModel](qabstractlistmodel.html)。 通過繼承[QHelpIndexModel](qhelpindexmodel.html)。 ### Methods * `__init__ (self, QObject?parent?=?None)` * `__init__ (self, QStringList?strings, QObject?parent?=?None)` * `QVariant data (self, QModelIndex?index, int?role)` * `Qt.ItemFlags flags (self, QModelIndex?index)` * `bool insertRows (self, int?row, int?count, QModelIndex?parent?=?QModelIndex())` * `bool removeRows (self, int?row, int?count, QModelIndex?parent?=?QModelIndex())` * `int rowCount (self, QModelIndex?parent?=?QModelIndex())` * `bool setData (self, QModelIndex?index, QVariant?value, int?role?=?Qt.EditRole)` * `setStringList (self, QStringList?strings)` * `sort (self, int?column, Qt.SortOrder?order?=?Qt.AscendingOrder)` * `QStringList stringList (self)` * `Qt.DropActions supportedDropActions (self)` * * * ## Detailed Description 該QStringListModel類提供了一個模型,它提供字符串的看法。 QStringListModel是可用于在您需要顯示的字符串有多個視圖中的小部件,如一個簡單的情況下可編輯模式[QListView](qlistview.html)或[QComboBox](qcombobox.html)。 該模型提供了一個可編輯的模型中所有的標準功能,即在字符串列表與一個列和一個行數等于項目的列表中的號碼的一個模型中的數據。 對應的項目模型索引以獲得[index()](qabstractlistmodel.html#index)功能和項目標志與獲得[flags](qstringlistmodel.html#flags)( ) 。項目數據的讀取使用[data](qstringlistmodel.html#data)()函數和寫入[setData](qstringlistmodel.html#setData)( ) 。行(并在字符串列表項目數)的數量可以與被發現[rowCount](qstringlistmodel.html#rowCount)()函數。 該模型可以與現有的字符串列表來構建或字符串可以在以后的設置[setStringList](qstringlistmodel.html#setStringList)( )的便利功能。串,也可以與通常的方式插入[insertRows](qstringlistmodel.html#insertRows)()函數,并用除去[removeRows](qstringlistmodel.html#removeRows)( ) 。字符串列表的內容可以檢索與[stringList](qstringlistmodel.html#stringList)( )的便利功能。 QStringListModel的使用示例: ``` QStringListModel *model = new QStringListModel(); [QStringList](qstringlist.html) list; list << "a" << "b" << "c"; model->setStringList(list); ``` * * * ## Method Documentation ``` QStringListModel.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造一個字符串列表模型與給定_parent_。 ``` QStringListModel.__init__ (self, QStringList?strings, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構建了含有指定的字符串列表模型_strings_用給定的_parent_。 ``` QVariant QStringListModel.data (self, QModelIndex?index, int?role) ``` 從重新實現[QAbstractItemModel.data](qabstractitemmodel.html#data)( ) 。 返回數據為指定的_role_從與給定的產品_index_。 如果視圖請求一個無效索引,則返回一個無效的變體。 **See also** [setData](qstringlistmodel.html#setData)( ) 。 ``` Qt.ItemFlags QStringListModel.flags (self, QModelIndex?index) ``` [](index.htm) [從重新實現](index.htm)[QAbstractItemModel.flags](qabstractitemmodel.html#flags)( ) 。 返回該標志的產品與給定的_index_。 有效的項目被啟用,可選擇,可編輯,拖放啟用,啟用的下降。 **See also** [QAbstractItemModel.flags](qabstractitemmodel.html#flags)( ) 。 ``` bool QStringListModel.insertRows (self, int?row, int?count, QModelIndex?parent?=?QModelIndex()) ``` 從重新實現[QAbstractItemModel.insertRows](qabstractitemmodel.html#insertRows)( ) 。 Inserts _count_行到模型中,開始在給定的_row_。 該_parent_行的索引是可選的,并且僅用于一致性[QAbstractItemModel](qabstractitemmodel.html)。默認情況下,一個空索引指定,表明行插入到模型的頂層。 **See also** [QAbstractItemModel.insertRows](qabstractitemmodel.html#insertRows)( ) 。 ``` bool QStringListModel.removeRows (self, int?row, int?count, QModelIndex?parent?=?QModelIndex()) ``` 從重新實現[QAbstractItemModel.removeRows](qabstractitemmodel.html#removeRows)( ) 。 移除_count_從模型的行,開始在給定的_row_。 該_parent_行的索引是可選的,并且僅用于一致性[QAbstractItemModel](qabstractitemmodel.html)。默認情況下,空的索引被指定,指示行中的模型的頂層被除去。 **See also** [QAbstractItemModel.removeRows](qabstractitemmodel.html#removeRows)( ) 。 ``` int QStringListModel.rowCount (self, QModelIndex?parent?=?QModelIndex()) ``` 從重新實現[QAbstractItemModel.rowCount](qabstractitemmodel.html#rowCount)( ) 。 返回行的模型數。此值對應于項目中的模型的內部字符串列表的數目。 可選的_parent_理由是,在大多數模型用來指定要計算的行的父。因為這是指定了有效的父清單時,結果將始終為0 。 **See also** [insertRows](qstringlistmodel.html#insertRows)( )[removeRows](qstringlistmodel.html#removeRows)()和[QAbstractItemModel.rowCount](qabstractitemmodel.html#rowCount)( ) 。 ``` bool QStringListModel.setData (self, QModelIndex?index, QVariant?value, int?role?=?Qt.EditRole) ``` 從重新實現[QAbstractItemModel.setData](qabstractitemmodel.html#setData)( ) 。 設置數據指定的_role_在與給定的產品_index_在該模型中,所提供的_value_。 該[dataChanged](qabstractitemmodel.html#dataChanged)如果該項目發生更改( )信號被發射。 **See also** [Qt.ItemDataRole](qt.html#ItemDataRole-enum)和[data](qstringlistmodel.html#data)( ) 。 ``` QStringListModel.setStringList (self, QStringList?strings) ``` 設置模型的內部字符串列表_strings_。該模型將通知所有已連接的視圖,其基礎數據已更改。 **See also** [stringList](qstringlistmodel.html#stringList)()和[dataChanged](qabstractitemmodel.html#dataChanged)( ) 。 ``` QStringListModel.sort (self, int?column, Qt.SortOrder?order?=?Qt.AscendingOrder) ``` 從重新實現[QAbstractItemModel.sort](qabstractitemmodel.html#sort)( ) 。 ``` QStringList QStringListModel.stringList (self) ``` 返回所使用的模型來存儲數據的字符串列表。 **See also** [setStringList](qstringlistmodel.html#setStringList)( ) 。 ``` Qt.DropActions QStringListModel.supportedDropActions (self) ``` [](index.htm) [從重新實現](index.htm)[QAbstractItemModel.supportedDropActions](qabstractitemmodel.html#supportedDropActions)( ) 。
                  <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>

                              哎呀哎呀视频在线观看