[Qt-interest] Disable sorting by some columns in QTableView

Alexandre Beraud aberaud at infflux.com
Fri Aug 7 14:55:22 CEST 2009


Sorry I did not understand that you just wanted to disable sorting on 
one column. You can still use the filter model and derive the 
QHeaderView class so that you can handle the clicks on your own columns 
header. Then, for the authorized colums, call the sort() methods of your 
filter model.
I hope it helps.
Regards,

Alex


Udovichenko Artem a écrit :
> To disable sorting by some columns I need to disable sorting and 
> handle clicking on section of QHeaderView.
> I am right?
> I don't understand how QSortFilterProxyModel can to help me.
>
> Alexandre Beraud пишет:
>> Hi,
>>
>> This link might help:
>> http://doc.trolltech.com/4.5/qsortfilterproxymodel.html
>>
>> Regards,
>>
>> Alex
>>
>>
>> Удовиченко Артем a écrit :
>>> Hello!
>>> I have a table(QTableView) of patients with columns: Name, Age and 
>>> Diagnosis.
>>> I need to sort this table by columns Name and Age but not Diagnosis.
>>> How can I do this?
>>>
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at trolltech.com
>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>
>>>
>>>   
>>
>>
>
>
>


-- 
Alexandre BERAUD
Ingénieur Développement

Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site :  www.infflux.com




More information about the Qt-interest-old mailing list