Hello,

I am trying to allow items in a QTableWidget to be sorted by date. Difficulty: 
I want to display the date to the user in a human-friendly way, yet be able to 
sort on that column.

What I have done is I have created a hidden column with a UNIX timestamp 
corresponding to that date, on which lexicographic sorting will generate the 
correct results. I need your help with the following:

- how can I intercept a click on a(n horizontal) header of a QTableWidget? I 
have tried defining its mousePressEvent() method, but it does not get called 
when the user clicks on a *header* (it does when the user clicks on a normal 
cell).

Many thanks for any help

lara


      

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to