Hello,

I have subclassed QAbstractTableModel. I have define my data method
correctly. However, I would like to get a kind of "hidden information" when
I double clicked on the view associated to my model (which is a qtreeview).

Hence, I have decided to use Qt.AccessibleDescriptionRole.

def data(self, index, role):

...stuff here...

if role == Qt.AccessibleDescriptionRole:

return "My information"




Here is the method called when the user double clicks on the treeview :

def file_clicked(self, index):

f_obj = index.child(index.row(),
0).data(Qt.AccessibleDescriptionRole).toString()


However, f_obj seems to be empty. I can't get the information returned by
the AccessibleDescriptionRole.
Do you have an idea about what am I doing wrong ?

Thank you,
Gaêtan
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to