Quote Originally Posted by antimatter View Post
So I tried getting it by casting the internal pointer of the model index.
That is very bad in any way, it is called "internal" for a reason. Only the model should ever make assumption about it because it is the one creating the index.

I would recommend adding a role that returns the full model data entry

Qt Code:
  1. Foo foo = index.data(FooRole).value<Foo>();
To copy to clipboard, switch view to plain text mode 

Cheers,
_