tags:

views:

28

answers:

1

Hi all i am using QTableWidget and when user click on perticuler row ,i use that index to perform some operation i have also enable sorting using setSortEnable so when i sort it bu clicking on header,all row index changed but i want previous index so wht should i do? please suggest me.

A: 

I'm guessing you want the unsorted index so you can map that back to some external list of data? If that is the case, then you should use a QTableView() which will allow you to setup a sort proxy and map indexes back to your original data (model).

This question has some info that may help: http://stackoverflow.com/questions/3586718/cant-use-itemfromindex-in-clicked-signal-of-qtreeview-with-qsortfilterproxymodel

Arnold Spence
actually i have one QVector which contain Qstringlist for indivisual row so write now what i am doing is taking whole selected row and use isContain method of QVector (but i dont think its right way to check it out) and taking the index from QVector
Chiku