[PYTHON]

I have a def

Qt Code:
  1. def sizeHint(self, option, index)
To copy to clipboard, switch view to plain text mode 

witch receives 2 args, QStyleOptionViewItem and QModelIndex. (its a reimplementation of sizeHint, for drawing items in a qtreeview).
As you can guess, I can't access the model where I have all the data because the def is located in another class. So, the question is, ¿how can I get the data of certain column, at the row from the "index" value, having the qmodelindex?

I have been looking at the docs, and I can do a index.model() witch will return me a QAbstractItemModel, but I got stuck there.

What should I do? Should I access the model from the other class? If there is a way of doing what I want to do without having to access the model from the another class it will be better.

Thanks