StupidBeauty
Read times:425Posted at:Mon Nov 29 10:09:04 2010 - no title specified

Qt4.7.0文档翻译:bool QAbstractItemModel::insertRows ( int row , int count , const QModelIndex & parent = QModelIndex() ) [virtual]

bool QAbstractItemModel::insertRows ( int row , int count , const QModelIndex & parent = QModelIndex() ) [virtual]

注意 基类对于这个函数的实现中不做任何事 ,并且返回假。

在支持这个的模型上,在模型中给定的第 row 行之前插入 count 。新的一行中的条目将会是由 parent 模型索引所表示的条目的子代条目

如果row是0,新行将会在亲代条目已有的所有行之前插入

如果 row rowCount () ,新行将会在亲代条目已有的所有行之后插入

如果parent没有子代条目,就会插入一个有 count 行的单独的列

如果那些行被成功插入,就返回真;否则返回假

如果你实现你自己的模型 ,如果你想要支持插入,你可以重载这个函数 。或者 ,你可以提供你自己的用于改变数据的应用编程接口。 无论是以哪种方式实现,你 都需要调用 beginInsertRows ()和 endInsertRows ()以让其它组件知道这个模型已经改变。

参见 insertColumns () removeRows () beginInsertRows () ,和 endInsertRows ()

Your opinions

Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4