当前位置:编程学习 > wap >>

QModelIndex的疑问

--------------------编程问答-------------------- 没人知道吗?自己顶! --------------------编程问答-------------------- const QAbstractItemModel * QModelIndex::model() const
Returns a pointer to the model containing the item that this index refers to. --------------------编程问答--------------------
引用 2 楼 heksn 的回复:
const QAbstractItemModel * QModelIndex::model() const
Returns a pointer to the model containing the item that this index refers to.

其实就是先找到这个model,之后再取index处的数据,连在一起写就成了那样。  --------------------编程问答-------------------- 个人认为QModelIndex 直接提供这个data方法完全是用来代替index.model()->data()的,大概因为用的比较多吧,至于实际的运用在于个人的喜好
补充:移动开发 ,  Qt
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,