[PyQt] QTableWidget: numeric sort

Bernard Van Der Stichele Bernard_VanDerStichele at otpp.com
Tue Sep 15 14:58:04 BST 2009

Hello list members,

The row sorting mechanism triggered when clicking on a column header 
functions by treating cell contents as strings - even if the cell contents 
were formatted as floats or integers.

Is there an intended mechanism designed to allow the sort to be 
customized? If so, what is it?

I've looked around and have only found various hacks. I'd be very 
surprised if this functionality had not been designed into the 
QTableWidget - sorting  is really critical to most applications making 
heavy usage of tabular information.

Am I missing the obvious?



This e-mail message, including any attachment(s), is confidential. If we sent this communication to you in error, please do not disclose it to anyone else or use the information in it. Please notify the sender of the transmission error and then delete our communication from your system without printing, copying or forwarding it.  Thank you for your co-operation.


Le present courriel, y compris toute piece qui y est jointe, est confidentiel. Si nous vous avons envoye cette communication par erreur, nous vous prions de ne la divulguer a personne ni a utiliser l’information qu’elle contient. Veuillez informer l’expediteur de l’erreur de transmission et effacer ensuite notre communication de votre systeme sans l’imprimer, ni la copier ni la retransmettre. Nous vous remercions de votre cooperation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090915/10e1f805/attachment.html

More information about the PyQt mailing list