Getting index From QTreeView
-
I have implemented QTreeView and fill elements in order like
root->patient->study->series->imageand 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
patient1(1)
study1(2)
series1(3)
image1(4)
patient2(5)
study2(6)
series2(7)
image2(8)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 -
Hi,
Where do these values come from ?