Whats the difference between...? (QModelIndex stuff)
-
Short question: when reading the "SpinBox Delegate" example I noticed the line "int value = index.model()->data(index, Qt::EditRole).toInt();" and remembered this question I had some os these days:
What is the difference between(?):
- index.model()->data(index)
- index.data()
Thanks in advance.
[]
Carlos -
qabstractitemmodel.h, lines 401-402
@
inline QVariant QModelIndex::data(int arole) const
{ return m ? m->data(*this, arole) : QVariant(); }
@does this answer your question? ;)
-
yep ;)