SetData(int role,const QVariant) Data(int role)
-
wrote on 14 Apr 2012, 02:00 last edited by
I'am typing codes in Chapter3,spreadsheet, of C++GUI Programming with Qt4.
I don't understand why these two methods don't contain parameter "int column". Otherwise, how it locates where the cell is. -
wrote on 16 Apr 2012, 13:00 last edited by
Not everyone has that book at hand. If you would tell us on which class you call that method, that would be great.
-
wrote on 16 Apr 2012, 13:08 last edited by
Well, all is contained in the [[doc:QModelIndex]]. It contains row, column and parent item. These three together uniquely identify an item in an model.
Edit: I happen to have the book here, but I can't quickly locate the exact snippet you're talking about.
1/3