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

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # QStandardItem Class Reference ## [[QtGui](index.htm) module] 該QStandardItem類提供的項目與使用[QStandardItemModel](qstandarditemmodel.html)類。[More...](#details) ### Types * `enum ItemType { Type, UserType }` ### Methods * `__init__ (self)` * `__init__ (self, QString?text)` * `__init__ (self, QIcon?icon, QString?text)` * `__init__ (self, int?rows, int?columns?=?1)` * `__init__ (self, QStandardItem?other)` * `QString accessibleDescription (self)` * `QString accessibleText (self)` * `appendColumn (self, list-of-QStandardItem?aitems)` * `appendRow (self, list-of-QStandardItem?aitems)` * `appendRow (self, QStandardItem?aitem)` * `appendRows (self, list-of-QStandardItem?aitems)` * `QBrush background (self)` * `Qt.CheckState checkState (self)` * `QStandardItem child (self, int?row, int?column?=?0)` * `QStandardItem clone (self)` * `int column (self)` * `int columnCount (self)` * `QVariant data (self, int?role?=?Qt.UserRole+1)` * `emitDataChanged (self)` * `Qt.ItemFlags flags (self)` * `QFont font (self)` * `QBrush foreground (self)` * `bool hasChildren (self)` * `QIcon icon (self)` * `QModelIndex index (self)` * `insertColumn (self, int?column, list-of-QStandardItem?items)` * `insertColumns (self, int?column, int?count)` * `insertRow (self, int?row, list-of-QStandardItem?items)` * `insertRow (self, int?arow, QStandardItem?aitem)` * `insertRows (self, int?row, int?count)` * `insertRows (self, int?row, list-of-QStandardItem?items)` * `bool isCheckable (self)` * `bool isDragEnabled (self)` * `bool isDropEnabled (self)` * `bool isEditable (self)` * `bool isEnabled (self)` * `bool isSelectable (self)` * `bool isTristate (self)` * `QStandardItemModel model (self)` * `QStandardItem parent (self)` * `read (self, QDataStream?in)` * `removeColumn (self, int?column)` * `removeColumns (self, int?column, int?count)` * `removeRow (self, int?row)` * `removeRows (self, int?row, int?count)` * `int row (self)` * `int rowCount (self)` * `setAccessibleDescription (self, QString?aaccessibleDescription)` * `setAccessibleText (self, QString?aaccessibleText)` * `setBackground (self, QBrush?abrush)` * `setCheckable (self, bool?checkable)` * `setCheckState (self, Qt.CheckState?acheckState)` * `setChild (self, int?row, int?column, QStandardItem?item)` * `setChild (self, int?arow, QStandardItem?aitem)` * `setColumnCount (self, int?columns)` * `setData (self, QVariant?value, int?role?=?Qt.UserRole+1)` * `setDragEnabled (self, bool?dragEnabled)` * `setDropEnabled (self, bool?dropEnabled)` * `setEditable (self, bool?editable)` * `setEnabled (self, bool?enabled)` * `setFlags (self, Qt.ItemFlags?flags)` * `setFont (self, QFont?afont)` * `setForeground (self, QBrush?abrush)` * `setIcon (self, QIcon?aicon)` * `setRowCount (self, int?rows)` * `setSelectable (self, bool?selectable)` * `setSizeHint (self, QSize?asizeHint)` * `setStatusTip (self, QString?astatusTip)` * `setText (self, QString?atext)` * `setTextAlignment (self, Qt.Alignment?atextAlignment)` * `setToolTip (self, QString?atoolTip)` * `setTristate (self, bool?tristate)` * `setWhatsThis (self, QString?awhatsThis)` * `QSize sizeHint (self)` * `sortChildren (self, int?column, Qt.SortOrder?order?=?Qt.AscendingOrder)` * `QString statusTip (self)` * `QStandardItem takeChild (self, int?row, int?column?=?0)` * `list-of-QStandardItem takeColumn (self, int?column)` * `list-of-QStandardItem takeRow (self, int?row)` * `QString text (self)` * `Qt.Alignment textAlignment (self)` * `QString toolTip (self)` * `int type (self)` * `QString whatsThis (self)` * `write (self, QDataStream?out)` ### Special Methods * `bool __ge__ (self, QStandardItem?other)` * `bool __lt__ (self, QStandardItem?other)` * * * ## Detailed Description 該QStandardItem類提供的項目與使用[QStandardItemModel](qstandarditemmodel.html)類。 項目通常包含文字,圖標或復選框。 每個項目都可以有自己的背景刷子設置與[setBackground](qstandarditem.html#setBackground)()函數。當前的背景刷可以找到[background](qstandarditem.html#background)( ) 。每個項目的文本標籤可以有自己的字體和筆刷渲染。這些都與指定[setFont](qstandarditem.html#setFont)()和[setForeground](qstandarditem.html#setForeground)()函數,并讀取與[font](qstandarditem.html#font)()和[foreground](qstandarditem.html#foreground)( ) 。 默認情況下,項目的啟用,可編輯,可選擇辨認的,可同時用作拖動的來源又是釋放的操作和放置目標。每個項目的標志可以通過調用改變[setFlags](qstandarditem.html#setFlags)( ) 。辨認的項目可以選中和未選中的[setCheckState](qstandarditem.html#setCheckState)()函數。相應的[checkState](qstandarditem.html#checkState)( )函數表示該項目目前是否已選中。 你可以通過調用一個項目存儲應用程序特定的數據[setData](qstandarditem.html#setData)( ) 。 每個項目可以有一個二維子項表。這使得它可以構建項目的層次結構。典型的分層結構是樹,在這種情況下,子表是一個表,用一個柱(列表)。 子表的尺寸可以與設置[setRowCount](qstandarditem.html#setRowCount)()和[setColumnCount](qstandarditem.html#setColumnCount)( ) 。物品可以放置在子表[setChild](qstandarditem.html#setChild)( ) 。獲取一個指針,指向一個子項與[child](qstandarditem.html#child)( ) 。兒童的新的行和列,也可以插入[insertRow](qstandarditem.html#insertRow)()和[insertColumn](qstandarditem.html#insertColumn)(),或者追加[appendRow](qstandarditem.html#appendRow)()和[appendColumn](qstandarditem.html#appendColumn)( ) 。當使用append和插入函數,子表的尺寸根據需要將增長。 兒童的現有行可以被刪除[removeRow](qstandarditem.html#removeRow)()或[takeRow](qstandarditem.html#takeRow)();相應地,一列可以具有去除[removeColumn](qstandarditem.html#removeColumn)()或[takeColumn](qstandarditem.html#takeColumn)( ) 。 一個項目的孩子可以通過調用進行排序[sortChildren](qstandarditem.html#sortChildren)( ) 。 ### Subclassing 當子類QStandardItem提供自定義項目,可以為他們定義新類型,使他們能夠從基類區別開來。該[type](qstandarditem.html#type)()函數應該被重新實現返回一個新的類型的值等于或大于[UserType](qstandarditem.html#ItemType-enum)。 重新實現[data](qstandarditem.html#data)()和[setData](qstandarditem.html#setData)( )如果要執行數據查詢的自定義處理和/或控制項的數據是如何表示的。 重新實現[clone](qstandarditem.html#clone)( )如果你想[QStandardItemModel](qstandarditemmodel.html)要能夠根據需要創建自定義項目類的實例(見[QStandardItemModel.setItemPrototype](qstandarditemmodel.html#setItemPrototype)())。 重新實現[read](qstandarditem.html#read)()和[write](qstandarditem.html#write)( )如果你想控制項目如何代表他們的序列化形式。 重新實現[operator&lt;](qstandarditem.html#operator-lt)( )如果你想控制項目比較的語義。[operator&lt;](qstandarditem.html#operator-lt)( )確定排序順序與排序項目時,[sortChildren](qstandarditem.html#sortChildren)()或與[QStandardItemModel.sort](qstandarditemmodel.html#sort)( ) 。 * * * ## Type Documentation ``` QStandardItem.ItemType ``` 這個枚舉變量描述了用于描述標準的項目的類型。 | Constant | Value | Description | | --- | --- | --- | | `QStandardItem.Type` | `0` | 默認類型為標準的項目。 | | `QStandardItem.UserType` | `1000` | 對于自定義類型的最小值。以下用戶等級和積分值被Qt保留。 | 您可以定義新的用戶類型[QStandardItem](qstandarditem.html)子類以確保自定義項目經過特殊處理,例如,當項目進行排序。 **See also** [type](qstandarditem.html#type)( ) 。 * * * ## Method Documentation ``` QStandardItem.__init__ (self) ``` 構造一個項目。 ``` QStandardItem.__init__ (self, QString?text) ``` 構造具有給定的項目_text_。 ``` QStandardItem.__init__ (self, QIcon?icon, QString?text) ``` 構造具有給定的項目_icon_和_text_。 ``` QStandardItem.__init__ (self, int?rows, int?columns?=?1) ``` 構造與項目_rows_行和_columns_子項的列。 ``` QStandardItem.__init__ (self, QStandardItem?other) ``` 構造的副本_other_。需要注意的是[model](qstandarditem.html#model)( )不會被復制。 重新實現時,此功能非常有用[clone](qstandarditem.html#clone)( ) 。 ``` QString QStandardItem.accessibleDescription (self) ``` 返回該項目的可訪問的描述。 可訪問的說明是使用輔助技術(即誰不能用互動的傳統方式用戶) 。 **See also** [setAccessibleDescription](qstandarditem.html#setAccessibleDescription)()和[accessibleText](qstandarditem.html#accessibleText)( ) 。 ``` QString QStandardItem.accessibleText (self) ``` 返回該項目的訪問的文本。 在訪問的文本所使用的輔助技術(即誰不能使用交互的常規手段的用戶) 。 **See also** [setAccessibleText](qstandarditem.html#setAccessibleText)()和[accessibleDescription](qstandarditem.html#accessibleDescription)( ) 。 ``` QStandardItem.appendColumn (self, list-of-QStandardItem?aitems) ``` 該_aitems_說法有它的所有權轉移給Qt的。 含追加一列_items_。如果有必要,該行數將增加至大小_items_。 **See also** [insertColumn](qstandarditem.html#insertColumn)( ) 。 ``` QStandardItem.appendRow (self, list-of-QStandardItem?aitems) ``` 該_aitems_說法有它的所有權轉移給Qt的。 含追加的行_items_。如果需要的話,列計數值增加到的大小_items_。 **See also** [insertRow](qstandarditem.html#insertRow)( ) 。 ``` QStandardItem.appendRow (self, QStandardItem?aitem) ``` 該_aitem_說法有它的所有權轉移給Qt的。 這是一個重載函數。 含追加的行_item_。 當建立一個列表,或者只有一列樹,該功能提供了一種方便的方式來追加新的單一項目。 ``` QStandardItem.appendRows (self, list-of-QStandardItem?aitems) ``` 該_aitems_說法有它的所有權轉移給Qt的。 含追加行_items_。列計數不會改變。 **See also** [insertRow](qstandarditem.html#insertRow)( ) 。 ``` QBrush QStandardItem.background (self) ``` [ 返回用于呈現項的背景的畫筆。 ](qbrush.html) [**See also**](qbrush.html) [foreground](qstandarditem.html#foreground)()和[setBackground](qstandarditem.html#setBackground)( ) 。 ``` Qt.CheckState QStandardItem.checkState (self) ``` [ 返回項目的選中狀態。 ](qt.html#CheckState-enum) [**See also**](qt.html#CheckState-enum) [setCheckState](qstandarditem.html#setCheckState)()和[isCheckable](qstandarditem.html#isCheckable)( ) 。 ``` QStandardItem QStandardItem.child (self, int?row, int?column?=?0) ``` [ 返回位于(子項_row_,_column_)如果已設置,否則返回0 。 ](qstandarditem.html) [**See also**](qstandarditem.html) [setChild](qstandarditem.html#setChild)( )[takeChild](qstandarditem.html#takeChild)()和[parent](qstandarditem.html#parent)( ) 。 ``` QStandardItem QStandardItem.clone (self) ``` [ 返回此文件的副本。該項目的孩子不會被復制。 ](qstandarditem.html) [當子類](qstandarditem.html)[QStandardItem](qstandarditem.html),你可以重新實現此功能提供[QStandardItemModel](qstandarditemmodel.html)用它可以用來創建隨需應變的新項目工廠。 **See also** [QStandardItemModel.setItemPrototype](qstandarditemmodel.html#setItemPrototype)()和[operator=](qstandarditem.html#operator-eq)( ) 。 ``` int QStandardItem.column (self) ``` 返回列該項目位于其父的子表,或-1,如果該項目沒有父。 **See also** [row](qstandarditem.html#row)()和[parent](qstandarditem.html#parent)( ) 。 ``` int QStandardItem.columnCount (self) ``` 返回子項列,該項目具有數量。 **See also** [setColumnCount](qstandarditem.html#setColumnCount)()和[rowCount](qstandarditem.html#rowCount)( ) 。 ``` QVariant QStandardItem.data (self, int?role?=?Qt.UserRole+1) ``` 返回的項目的數據為給定的_role_,或無效[QVariant](qvariant.html)如果不存在數據的作用。 **Note:**默認實現對待[Qt.EditRole](qt.html#ItemDataRole-enum)和[Qt.DisplayRole](qt.html#ItemDataRole-enum)為是指相同的數據。 **See also** [setData](qstandarditem.html#setData)( ) 。 ``` QStandardItem.emitDataChanged (self) ``` 原因與此文件相關的模型發出[dataChanged](qabstractitemmodel.html#dataChanged)()信號為這個項目。 你通常只需要調用這個函數,如果你有子類[QStandardItem](qstandarditem.html)并重新實現[data](qstandarditem.html#data)( )和/或[setData](qstandarditem.html#setData)( ) 。 此功能被引入Qt的4.4 。 **See also** [setData](qstandarditem.html#setData)( ) 。 ``` Qt.ItemFlags QStandardItem.flags (self) ``` [ 返回項標志的項目。 項目標志確定用戶如何能夠與項目交互。 默認情況下,項目的啟用,可編輯,可選擇辨認的,可同時用作拖動的來源又是釋放的操作和放置目標。 ](index.htm) [**See also**](index.htm) [setFlags](qstandarditem.html#setFlags)( ) 。 ``` QFont QStandardItem.font (self) ``` [ 返回用于呈現項的文本的字體。 ](qfont.html) [**See also**](qfont.html) [setFont](qstandarditem.html#setFont)( ) 。 ``` QBrush QStandardItem.foreground (self) ``` [ 返回用于呈現項目的前景(如文字)的筆刷。 ](qbrush.html) [**See also**](qbrush.html) [setForeground](qstandarditem.html#setForeground)()和[background](qstandarditem.html#background)( ) 。 ``` bool QStandardItem.hasChildren (self) ``` 返回True如果資料有任何子女;否則返回False。 **See also** [rowCount](qstandarditem.html#rowCount)( )[columnCount](qstandarditem.html#columnCount)()和[child](qstandarditem.html#child)( ) 。 ``` QIcon QStandardItem.icon (self) ``` [ 返回該項目的圖標。 ](qicon.html) [**See also**](qicon.html) [setIcon](qstandarditem.html#setIcon)()和[iconSize](qabstractitemview.html#iconSize-prop)。 ``` QModelIndex QStandardItem.index (self) ``` [](qmodelindex.html) [返回](qmodelindex.html)[QModelIndex](qmodelindex.html)與此文件相關。 當你需要調用一個功能項[QModelIndex](qmodelindex.html)的API (例如[QAbstractItemView](qabstractitemview.html)) ,你可以調用這個函數來獲得與該項目的位置在模型中的索引。 如果該項目沒有與模型,無效的關聯[QModelIndex](qmodelindex.html)返回。 **See also** [model](qstandarditem.html#model)()和[QStandardItemModel.itemFromIndex](qstandarditemmodel.html#itemFromIndex)( ) 。 ``` QStandardItem.insertColumn (self, int?column, list-of-QStandardItem?items) ``` 該_items_說法有它的所有權轉移給Qt的。 在插入一列_column_ containing _items_。如果有必要,該行數將增加至大小_items_。 **See also** [insertColumns](qstandarditem.html#insertColumns)()和[insertRow](qstandarditem.html#insertRow)( ) 。 ``` QStandardItem.insertColumns (self, int?column, int?count) ``` Inserts _count_在柱子項的列_column_。 **See also** [insertColumn](qstandarditem.html#insertColumn)()和[insertRows](qstandarditem.html#insertRows)( ) 。 ``` QStandardItem.insertRow (self, int?row, list-of-QStandardItem?items) ``` 該_items_說法有它的所有權轉移給Qt的。 插入一個一行_row_ containing _items_。如果需要的話,列計數值增加到的大小_items_。 **See also** [insertRows](qstandarditem.html#insertRows)()和[insertColumn](qstandarditem.html#insertColumn)( ) 。 ``` QStandardItem.insertRow (self, int?arow, QStandardItem?aitem) ``` 該_aitem_說法有它的所有權轉移給Qt的。 這是一個重載函數。 插入一個一行_row_ containing _item_。 當建立一個列表,或者只有一列樹,該功能提供了一種方便的方式來插入一個新的項目。 ``` QStandardItem.insertRows (self, int?row, int?count) ``` Inserts _items_在_row_。列計數不會改變。 **See also** [insertRow](qstandarditem.html#insertRow)()和[insertColumn](qstandarditem.html#insertColumn)( ) 。 ``` QStandardItem.insertRows (self, int?row, list-of-QStandardItem?items) ``` 該_items_說法有它的所有權轉移給Qt的。 Inserts _count_在一行行的子項_row_。 **See also** [insertRow](qstandarditem.html#insertRow)()和[insertColumns](qstandarditem.html#insertColumns)( ) 。 ``` bool QStandardItem.isCheckable (self) ``` 返回該項目是否是用戶可選中。 默認值是False 。 **See also** [setCheckable](qstandarditem.html#setCheckable)( )[checkState](qstandarditem.html#checkState)()和[isTristate](qstandarditem.html#isTristate)( ) 。 ``` bool QStandardItem.isDragEnabled (self) ``` 返回該項目是否啟用拖動。一個項目,是拖拉啟用可以由用戶進行拖動。 默認值是True 。 請注意,項目必須拖著在視圖中啟用拖放到工作;看[QAbstractItemView.dragEnabled](qabstractitemview.html#dragEnabled-prop)。 **See also** [setDragEnabled](qstandarditem.html#setDragEnabled)( )[isDropEnabled](qstandarditem.html#isDropEnabled)()和[flags](qstandarditem.html#flags)( ) 。 ``` bool QStandardItem.isDropEnabled (self) ``` 返回該項目是否下降啟用。當一個項目是下拉使能時,它可以作為一個放置目標。 默認值是True 。 **See also** [setDropEnabled](qstandarditem.html#setDropEnabled)( )[isDragEnabled](qstandarditem.html#isDragEnabled)()和[flags](qstandarditem.html#flags)( ) 。 ``` bool QStandardItem.isEditable (self) ``` 返回是否該項目可以由用戶進行編輯。 當一個項目是可編輯的(并啟用) ,用戶可以通過調用視圖的編輯觸發器中的一個編輯的項目;見[QAbstractItemView.editTriggers](qabstractitemview.html#editTriggers-prop)。 默認值是True 。 **See also** [setEditable](qstandarditem.html#setEditable)()和[flags](qstandarditem.html#flags)( ) 。 ``` bool QStandardItem.isEnabled (self) ``` 返回該項是否已啟用。 當一個項目被啟用,用戶可以與它進行交互。可能的類型的交互是由其它產品的標志,如指定[isEditable](qstandarditem.html#isEditable)()和[isSelectable](qstandarditem.html#isSelectable)( ) 。 默認值是True 。 **See also** [setEnabled](qstandarditem.html#setEnabled)()和[flags](qstandarditem.html#flags)( ) 。 ``` bool QStandardItem.isSelectable (self) ``` 返回該產品是否是由用戶選擇的。 默認值是True 。 **See also** [setSelectable](qstandarditem.html#setSelectable)()和[flags](qstandarditem.html#flags)( ) 。 ``` bool QStandardItem.isTristate (self) ``` 該項目的回報是否是三態的,也就是說,如果它是可復用三個分開的狀態。 默認值是False 。 **See also** [setTristate](qstandarditem.html#setTristate)( )[isCheckable](qstandarditem.html#isCheckable)()和[checkState](qstandarditem.html#checkState)( ) 。 ``` QStandardItemModel QStandardItem.model (self) ``` [](qstandarditemmodel.html) [返回](qstandarditemmodel.html)[QStandardItemModel](qstandarditemmodel.html)此項目屬于。 如果該項目不屬于模型的另一個項目的一個孩子,這個函數返回0 。 **See also** [index](qstandarditem.html#index)( ) 。 ``` QStandardItem QStandardItem.parent (self) ``` [ 返回該項目的父項目,或者0,如果該項目沒有父。 ](qstandarditem.html) [**See also**](qstandarditem.html) [child](qstandarditem.html#child)( ) 。 ``` QStandardItem.read (self, QDataStream?in) ``` 從流中讀取的項目_in_。唯一的項的數據和標志讀,而不是子項。 **See also** [write](qstandarditem.html#write)( ) 。 ``` QStandardItem.removeColumn (self, int?column) ``` 刪除給定的_column_。這是該列中的項被刪除。 **See also** [takeColumn](qstandarditem.html#takeColumn)( )[removeColumns](qstandarditem.html#removeColumns)()和[removeRow](qstandarditem.html#removeRow)( ) 。 ``` QStandardItem.removeColumns (self, int?column, int?count) ``` 移除_count_在列的列_column_。這是這些列中的項將被刪除。 **See also** [removeColumn](qstandarditem.html#removeColumn)()和[removeRows](qstandarditem.html#removeRows)( ) 。 ``` QStandardItem.removeRow (self, int?row) ``` 刪除給定的_row_。這是該行中的項目被刪除。 **See also** [takeRow](qstandarditem.html#takeRow)( )[removeRows](qstandarditem.html#removeRows)()和[removeColumn](qstandarditem.html#removeColumn)( ) 。 ``` QStandardItem.removeRows (self, int?row, int?count) ``` 移除_count_在一行行_row_。這是在這些行中的項目都將被刪除。 **See also** [removeRow](qstandarditem.html#removeRow)()和[removeColumn](qstandarditem.html#removeColumn)( ) 。 ``` int QStandardItem.row (self) ``` 返回該行所在的項目位于其父的子表,或-1,如果該項目沒有父。 **See also** [column](qstandarditem.html#column)()和[parent](qstandarditem.html#parent)( ) 。 ``` int QStandardItem.rowCount (self) ``` 返回該項目具有子項的行數。 **See also** [setRowCount](qstandarditem.html#setRowCount)()和[columnCount](qstandarditem.html#columnCount)( ) 。 ``` QStandardItem.setAccessibleDescription (self, QString?aaccessibleDescription) ``` 設置項目的訪問描述為字符串由指定的_accessibleDescription_。 可訪問的說明是使用輔助技術(即誰不能用互動的傳統方式用戶) 。 **See also** [accessibleDescription](qstandarditem.html#accessibleDescription)()和[setAccessibleText](qstandarditem.html#setAccessibleText)( ) 。 ``` QStandardItem.setAccessibleText (self, QString?aaccessibleText) ``` 設置項目的訪問的文本由指定的字符串_accessibleText_。 在訪問的文本所使用的輔助技術(即誰不能使用交互的常規手段的用戶) 。 **See also** [accessibleText](qstandarditem.html#accessibleText)()和[setAccessibleDescription](qstandarditem.html#setAccessibleDescription)( ) 。 ``` QStandardItem.setBackground (self, QBrush?abrush) ``` 設置項的背景刷到指定的_brush_。 **See also** [background](qstandarditem.html#background)()和[setForeground](qstandarditem.html#setForeground)( ) 。 ``` QStandardItem.setCheckable (self, bool?checkable) ``` 設置項是否是用戶可選中。如果_checkable_誠然,該項目可以由用戶進行檢查,否則用戶無法檢查的項目。 該項目委讬將呈現辨認的項目與項目旁邊的文本的復選框。 **See also** [isCheckable](qstandarditem.html#isCheckable)( )[setCheckState](qstandarditem.html#setCheckState)()和[setTristate](qstandarditem.html#setTristate)( ) 。 ``` QStandardItem.setCheckState (self, Qt.CheckState?acheckState) ``` 設置為項目的選中狀態_state_。 **See also** [checkState](qstandarditem.html#checkState)()和[setCheckable](qstandarditem.html#setCheckable)( ) 。 ``` QStandardItem.setChild (self, int?row, int?column, QStandardItem?item) ``` 該_item_說法有它的所有權轉移給Qt的。 設置在子項(_row_,_column_)至_item_。此產品(父項)需要的所有權_item_。如果必要,行數和列數都增加,以適應產品。 **See also** [child](qstandarditem.html#child)( ) 。 ``` QStandardItem.setChild (self, int?arow, QStandardItem?aitem) ``` 該_aitem_說法有它的所有權轉移給Qt的。 這是一個重載函數。 設定孩子_row_至_item_。 ``` QStandardItem.setColumnCount (self, int?columns) ``` 設置子項的列數_columns_。如果它小于[columnCount](qstandarditem.html#columnCount)() ,在不需要的列中的數據將被丟棄。 **See also** [columnCount](qstandarditem.html#columnCount)()和[setRowCount](qstandarditem.html#setRowCount)( ) 。 ``` QStandardItem.setData (self, QVariant?value, int?role?=?Qt.UserRole+1) ``` 設置項的數據為給定的_role_到指定的_value_。 如果子類[QStandardItem](qstandarditem.html)并且重新實現這個功能,你重新實現應該調用[emitDataChanged](qstandarditem.html#emitDataChanged)( )如果你不使用setData調用的基實現( ) 。這將確保如使用模型視圖通知的變化。 **Note:**默認實現對待[Qt.EditRole](qt.html#ItemDataRole-enum)和[Qt.DisplayRole](qt.html#ItemDataRole-enum)為是指相同的數據。 **See also** [Qt.ItemDataRole](qt.html#ItemDataRole-enum),[data](qstandarditem.html#data)()和[setFlags](qstandarditem.html#setFlags)( ) 。 ``` QStandardItem.setDragEnabled (self, bool?dragEnabled) ``` 設置項是否啟用拖動。如果_dragEnabled_誠然,該項目可以由用戶拖動,否則,用戶無法拖曳項目。 請注意,您還需要確保該項目拖動在視圖中啟用;見[QAbstractItemView.dragEnabled](qabstractitemview.html#dragEnabled-prop)。 **See also** [isDragEnabled](qstandarditem.html#isDragEnabled)( )[setDropEnabled](qstandarditem.html#setDropEnabled)()和[setFlags](qstandarditem.html#setFlags)( ) 。 ``` QStandardItem.setDropEnabled (self, bool?dropEnabled) ``` 設置項是否下降啟用。如果_dropEnabled_誠然,該項目可作為放置目標,否則不能。 請注意,您還需要確保滴在視圖中啟用;見[QWidget.acceptDrops](qwidget.html#acceptDrops-prop)(); ,且該模型支持所需的放置動作;見[QAbstractItemModel.supportedDropActions](qabstractitemmodel.html#supportedDropActions)( ) 。 **See also** [isDropEnabled](qstandarditem.html#isDropEnabled)( )[setDragEnabled](qstandarditem.html#setDragEnabled)()和[setFlags](qstandarditem.html#setFlags)( ) 。 ``` QStandardItem.setEditable (self, bool?editable) ``` 設置項是否可以編輯。如果_editable_誠然,該項目可以由用戶進行編輯,否則用戶無法編輯的項目。 如何通過視圖的編輯觸發器來確定用戶可以編輯視圖中的項目;見[QAbstractItemView.editTriggers](qabstractitemview.html#editTriggers-prop)。 **See also** [isEditable](qstandarditem.html#isEditable)()和[setFlags](qstandarditem.html#setFlags)( ) 。 ``` QStandardItem.setEnabled (self, bool?enabled) ``` 設置該項是否已啟用。如果_enabled_為真,則該項目被使能,這意味著用戶可以與產品進行交互;若_enabled_為假,則用戶不能與項目交互。 此標志優先于其他項目的標志;如如果項目沒有被啟用,它不能由用戶選擇的,即使[Qt.ItemIsSelectable](qt.html#ItemFlag-enum)標志已設置。 **See also** [isEnabled](qstandarditem.html#isEnabled)( )[Qt.ItemIsEnabled](qt.html#ItemFlag-enum)和[setFlags](qstandarditem.html#setFlags)( ) 。 ``` QStandardItem.setFlags (self, Qt.ItemFlags?flags) ``` 設置項標志的項目_flags_。 項目標志確定用戶如何能夠與項目交互。這通常被用于禁用的項目。 **See also** [flags](qstandarditem.html#flags)()和[setData](qstandarditem.html#setData)( ) 。 ``` QStandardItem.setFont (self, QFont?afont) ``` 設置用于顯示項目的文字給定的字體_font_。 **See also** [font](qstandarditem.html#font)( )[setText](qstandarditem.html#setText)()和[setForeground](qstandarditem.html#setForeground)( ) 。 ``` QStandardItem.setForeground (self, QBrush?abrush) ``` 設置用于顯示項目的前景(如文本)給定的畫筆_brush_。 **See also** [foreground](qstandarditem.html#foreground)( )[setBackground](qstandarditem.html#setBackground)()和[setFont](qstandarditem.html#setFont)( ) 。 ``` QStandardItem.setIcon (self, QIcon?aicon) ``` 設置項的圖標_icon_規定。 **See also** [icon](qstandarditem.html#icon)( ) 。 ``` QStandardItem.setRowCount (self, int?rows) ``` 設置的子項目行數_rows_。如果它小于[rowCount](qstandarditem.html#rowCount)() ,在不需要的行中的數據將被丟棄。 **See also** [rowCount](qstandarditem.html#rowCount)()和[setColumnCount](qstandarditem.html#setColumnCount)( ) 。 ``` QStandardItem.setSelectable (self, bool?selectable) ``` 設置項是否可選。如果_selectable_誠然,該項目可以由用戶來選擇,否則,用戶無法選擇該項目。 您可以通過操縱自己的視圖屬性控制選擇行為和模式,見[QAbstractItemView.selectionMode](qabstractitemview.html#selectionMode-prop)和[QAbstractItemView.selectionBehavior](qabstractitemview.html#selectionBehavior-prop)。 **See also** [isSelectable](qstandarditem.html#isSelectable)()和[setFlags](qstandarditem.html#setFlags)( ) 。 ``` QStandardItem.setSizeHint (self, QSize?asizeHint) ``` 設置尺寸暗示該項目是_size_。如果沒有大小的提示設置,基于項目數據的項目代表將計算尺寸暗示。 **See also** [sizeHint](qstandarditem.html#sizeHint)( ) 。 ``` QStandardItem.setStatusTip (self, QString?astatusTip) ``` 設置項目的狀態提示由指定的字符串_statusTip_。 **See also** [statusTip](qstandarditem.html#statusTip)( )[setToolTip](qstandarditem.html#setToolTip)()和[setWhatsThis](qstandarditem.html#setWhatsThis)( ) 。 ``` QStandardItem.setText (self, QString?atext) ``` 設置項的文字到_text_規定。 **See also** [text](qstandarditem.html#text)( )[setFont](qstandarditem.html#setFont)()和[setForeground](qstandarditem.html#setForeground)( ) 。 ``` QStandardItem.setTextAlignment (self, Qt.Alignment?atextAlignment) ``` 設置文本對齊方式為項目的文字到_alignment_規定。 **See also** [textAlignment](qstandarditem.html#textAlignment)( ) 。 ``` QStandardItem.setToolTip (self, QString?atoolTip) ``` 設置項的提示通過指定的字符串_toolTip_。 **See also** [toolTip](qstandarditem.html#toolTip)( )[setStatusTip](qstandarditem.html#setStatusTip)()和[setWhatsThis](qstandarditem.html#setWhatsThis)( ) 。 ``` QStandardItem.setTristate (self, bool?tristate) ``` 設置項是否為三態。如果_tristate_誠然,該項目是可復用三個獨立的狀態,否則,該項目是可復用兩種狀態。 (請注意,這也要求產品可復見[isCheckable](qstandarditem.html#isCheckable)( ) 。 ) **See also** [isTristate](qstandarditem.html#isTristate)( )[setCheckable](qstandarditem.html#setCheckable)()和[setCheckState](qstandarditem.html#setCheckState)( ) 。 ``` QStandardItem.setWhatsThis (self, QString?awhatsThis) ``` 設置項的“這是什么? ”有助于通過指定的字符串_whatsThis_。 **See also** [whatsThis](qstandarditem.html#whatsThis)( )[setStatusTip](qstandarditem.html#setStatusTip)()和[setToolTip](qstandarditem.html#setToolTip)( ) 。 ``` QSize QStandardItem.sizeHint (self) ``` [](qsize.html) [返回該項目的尺寸暗示組,或無效](qsize.html)[QSize](qsize.html)如果沒有尺寸暗示已定。 如果沒有大小提示已設置的基礎上,項目數據的項目代表將計算尺寸暗示。 **See also** [setSizeHint](qstandarditem.html#setSizeHint)( ) 。 ``` QStandardItem.sortChildren (self, int?column, Qt.SortOrder?order?=?Qt.AscendingOrder) ``` 排序的項目的使用給定的孩子_order_通過在給定的值_column_。 **Note:**這個函數是遞歸的,因此它排序的項目,其孫子女,等孩子們 **See also** [operator&lt;](qstandarditem.html#operator-lt)( ) 。 ``` QString QStandardItem.statusTip (self) ``` 返回項目的狀態提示。 **See also** [setStatusTip](qstandarditem.html#setStatusTip)( )[toolTip](qstandarditem.html#toolTip)()和[whatsThis](qstandarditem.html#whatsThis)( ) 。 ``` QStandardItem QStandardItem.takeChild (self, int?row, int?column?=?0) ``` [ The _QStandardItem_ result 刪除的子項(_row_,_column_)而不刪除它,并返回一個指向的項目。如果沒有孩子在給定的位置,那么這個函數返回0 。 ](qstandarditem.html) [注意,這個函數,不象](qstandarditem.html)[takeRow](qstandarditem.html#takeRow)()和[takeColumn](qstandarditem.html#takeColumn)( ) ,不影響子表的尺寸。 **See also** [child](qstandarditem.html#child)( )[takeRow](qstandarditem.html#takeRow)()和[takeColumn](qstandarditem.html#takeColumn)( ) 。 ``` list-of-QStandardItem QStandardItem.takeColumn (self, int?column) ``` 該_list-of-QStandardItem_結果 移除_column_不刪除的列項,并返回指針列表的刪除的項。在尚未設定的列項,列表中的相應指針將是0 。 **See also** [removeColumn](qstandarditem.html#removeColumn)( )[insertColumn](qstandarditem.html#insertColumn)()和[takeRow](qstandarditem.html#takeRow)( ) 。 ``` list-of-QStandardItem QStandardItem.takeRow (self, int?row) ``` 該_list-of-QStandardItem_結果 移除_row_不刪除的行項目,并返回指針列表的刪除的項目。對于沒有被設置的行中的項目,列表中的相應指針將是0 。 **See also** [removeRow](qstandarditem.html#removeRow)( )[insertRow](qstandarditem.html#insertRow)()和[takeColumn](qstandarditem.html#takeColumn)( ) 。 ``` QString QStandardItem.text (self) ``` 返回項的文本。這是這是呈現給用戶在視圖中的文本。 **See also** [setText](qstandarditem.html#setText)( ) 。 ``` Qt.Alignment QStandardItem.textAlignment (self) ``` [ 返回文本對齊方式項的文本。 ](index.htm) [**See also**](index.htm) [setTextAlignment](qstandarditem.html#setTextAlignment)( ) 。 ``` QString QStandardItem.toolTip (self) ``` 返回該項目的工具提示。 **See also** [setToolTip](qstandarditem.html#setToolTip)( )[statusTip](qstandarditem.html#statusTip)()和[whatsThis](qstandarditem.html#whatsThis)( ) 。 ``` int QStandardItem.type (self) ``` 返回此項目的類型。該類型用于從基類區分自定義項目。當子類[QStandardItem](qstandarditem.html),你應該重新實現這個函數,并返回一個新的值大于或等于[UserType](qstandarditem.html#ItemType-enum)。 **See also** [QStandardItem.Type](qstandarditem.html#ItemType-enum)。 ``` QString QStandardItem.whatsThis (self) ``` 返回該項目的“這是什么? ”幫助。 **See also** [setWhatsThis](qstandarditem.html#setWhatsThis)( )[toolTip](qstandarditem.html#toolTip)()和[statusTip](qstandarditem.html#statusTip)( ) 。 ``` QStandardItem.write (self, QDataStream?out) ``` 寫入流的項目_out_。該項目的唯一的數據和標志都寫,不是孩子的項目。 **See also** [read](qstandarditem.html#read)( ) 。 ``` bool QStandardItem.__ge__ (self, QStandardItem?other) ``` ``` bool QStandardItem.__lt__ (self, QStandardItem?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>

                              哎呀哎呀视频在线观看