<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之旅 廣告
                # QAbstractTableModel Class Reference ## [[QtCore](index.htm) module] 該QAbstractTableModel類提供了可以被子類來創建表款的抽象模型。[More...](#details) 繼承[QAbstractItemModel](qabstractitemmodel.html)。 通過繼承[QSqlQueryModel](qsqlquerymodel.html)。 ### Methods * `__init__ (self, QObject?parent?=?None)` * `bool dropMimeData (self, QMimeData?data, Qt.DropAction?action, int?row, int?column, QModelIndex?parent)` * `QModelIndex index (self, int?row, int?column, QModelIndex?parent?=?QModelIndex())` * * * ## Detailed Description 該QAbstractTableModel類提供了可以被子類來創建表款的抽象模型。 QAbstractTableModel為表示它們的數據作為二維件陣列模型的標準接口。它不能直接使用,但必須被繼承。 由于該模型提供了一個更專門的接口比[QAbstractItemModel](qabstractitemmodel.html),它不適合于用樹視圖的使用,雖然它可以被用于提供數據給一個[QListView](qlistview.html)。如果你需要表示項目的簡單列表,只需要一個模型來包含數據的單個列,子類化[QAbstractListModel](qabstractlistmodel.html)可能更合適。 該[rowCount](qabstractitemmodel.html#rowCount)()和[columnCount](qabstractitemmodel.html#columnCount)( )函數返回的表的尺寸。擷取對應到模型中的項目的模型索引,請使用[index](qabstracttablemodel.html#index)( ),并提供唯一的行號和列號。 ### Subclassing 當子類QAbstractTableModel ,必須實現[rowCount](qabstractitemmodel.html#rowCount)( )[columnCount](qabstractitemmodel.html#columnCount)()和[data](qabstractitemmodel.html#data)( ) 。的默認實現[index](qabstracttablemodel.html#index)()和[parent](qabstractitemmodel.html#parent)()函數是將QAbstractTableModel提供。表現良好的車型也將實施[headerData](qabstractitemmodel.html#headerData)( ) 。 可編輯的模型需要實現[setData](qabstractitemmodel.html#setData)( ) ,并實施[flags](qabstractitemmodel.html#flags)( )返回一個包含一個值[Qt.ItemIsEditable](qt.html#ItemFlag-enum)。 模型,提供接口來調整大小的數據結構可以提供的實現[insertRows](qabstractitemmodel.html#insertRows)( )[removeRows](qabstractitemmodel.html#removeRows)( )[insertColumns](qabstractitemmodel.html#insertColumns)()和[removeColumns](qabstractitemmodel.html#removeColumns)( ) 。當實現這些功能,它調用相應的功能很重要,這樣所有連接的看法是知悉有任何變化: * An [insertRows](qabstractitemmodel.html#insertRows)() implementation must call [beginInsertRows](qabstractitemmodel.html#beginInsertRows)() _before_ inserting new rows into the data structure, and it must call [endInsertRows](qabstractitemmodel.html#endInsertRows)() _immediately afterwards_. * An [insertColumns](qabstractitemmodel.html#insertColumns)() implementation must call [beginInsertColumns](qabstractitemmodel.html#beginInsertColumns)() _before_ inserting new columns into the data structure, and it must call [endInsertColumns](qabstractitemmodel.html#endInsertColumns)() _immediately afterwards_. * A [removeRows](qabstractitemmodel.html#removeRows)() implementation must call [beginRemoveRows](qabstractitemmodel.html#beginRemoveRows)() _before_ the rows are removed from the data structure, and it must call [endRemoveRows](qabstractitemmodel.html#endRemoveRows)() _immediately afterwards_. * A [removeColumns](qabstractitemmodel.html#removeColumns)() implementation must call [beginRemoveColumns](qabstractitemmodel.html#beginRemoveColumns)() _before_ the columns are removed from the data structure, and it must call [endRemoveColumns](qabstractitemmodel.html#endRemoveColumns)() _immediately afterwards_. **Note:**可在子類化模型的一些通用準則[Model Subclassing Reference](index.htm#model-subclassing-reference)。 **Note:** * * * ## Method Documentation ``` QAbstractTableModel.__init__ (self, QObject?parent?=?None) ``` 該_parent_的說法,如果不是沒有,原因_self_通過Qt的,而不是PyQt的擁有。 構造為給定的抽象表模型_parent_。 ``` bool QAbstractTableModel.dropMimeData (self, QMimeData?data, Qt.DropAction?action, int?row, int?column, QModelIndex?parent) ``` 從重新實現[QAbstractItemModel.dropMimeData](qabstractitemmodel.html#dropMimeData)( ) 。 ``` QModelIndex QAbstractTableModel.index (self, int?row, int?column, QModelIndex?parent?=?QModelIndex()) ``` [](qmodelindex.html) [從重新實現](qmodelindex.html)[QAbstractItemModel.index](qabstractitemmodel.html#index)( ) 。 返回的數據的索引_row_和_column_同_parent_。 **See also** [parent](qabstractitemmodel.html#parent)( ) 。
                  <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>

                              哎呀哎呀视频在线观看