以下成員源於類 QAbstractItemModel 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(obsolete)
void
|
dumpObjectInfo () |
(obsolete)
void
|
dumpObjectTree () |
(obsolete)
void
|
setSupportedDragActions (Qt::DropActions actions ) |
(obsolete)
QString
|
trUtf8 (const char * sourceText , const char * disambiguation = Q_OBJECT, int n = Q_OBJECT) |
(obsolete)
void
|
reset () |
(obsolete)
void
|
setRoleNames (const QHash<int, QByteArray> & roleNames ) |
[protected]
void
QAbstractItemModel::
reset
()
此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。
Resets the model to its original state in any attached views.
This function emits the signals modelAboutToBeReset () 和 modelReset ().
注意: 使用 beginResetModel () 和 endResetModel () instead whenever possible. Use this method only if there is no way to call beginResetModel () before invalidating the model. Otherwise it could lead to unexpected behaviour, especially when used with proxy models.
For example, in this code both signals modelAboutToBeReset () 和 modelReset () are emitted after the data changes:
myData.clear();
reset();
Instead you should use:
beginResetModel();
myData.clear();
endResetModel();
[protected]
void
QAbstractItemModel::
setRoleNames
(const
QHash
<
int
,
QByteArray
> &
roleNames
)
此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。
This function is obsolete. Reimplement roleNames () 代替。
Sets the model's role names to roleNames .
This function allows mapping of role identifiers to role property names in scripting languages.
該函數在 Qt 4.6 引入。
另請參閱 roleNames ().
此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。
This function is obsolete. Reimplement supportedDragActions () 代替。
Sets the supported drag actions for the items in the model.
該函數在 Qt 4.2 引入。
另請參閱 supportedDragActions () 和 將拖放用於項視圖 .