Getting index From QTreeView
I have implemented QTreeView and fill elements in order like
and there can be multiple studies in a patient ,multiple series in a study and so on..i was able to fil up those values and QtreeView is displaying data correctly
Now i wanted to implement Signal slot so that when i click on particular image so only that image is displayed so i called connect(treeview,SIGNAL(clicked(QModelIndex)),this,SLOT(fileselection(QModelIndex)));
It returns me QmodelIndex .but how can i know the integer value from QmodelIndex like how it is filled.
For Example lets the tree be
Now i wanted to obtain those values that i have specified in bracket (QmodelIndex to bracket values)
I fill them in same order like first patient 1,then study 1 and so on
Where do these values come from ?