Well, index.column() can obviously not be 8 and 9 at the same time, so first checking for 8 and the checking for 9 will always fail.
Just imagine what the view will do when it wants to get the value of column 9 in, lets say the first row.
It will call data() with an index that contains row=0 and column=9, right?
So checking for 8 is not going to help you in any way, right?
So you now have the value for row 0, column 9. You want to return that value or a changed value depending on the value in column 8.
How do you get the value of column 8, same row?
Cheers,
_
Bookmarks