[PyQt] question re: QVariant formatting in QTableWidgetItem
Brian Gyss
brian.gyss at gmail.com
Sat May 10 19:49:38 BST 2008
All:
I'm having some issues changing the formatting of a number in a
QTableWidgetItem. It seems that whenever I feed any sort of number
with non-zero digits in front of a decimal point into the QVariant
type, the QTableWidgetItem will always display the formatting to 6
digits in a specific format.
For example, a number like this:
10454.450432
will always be depicted like this:
10,454.4
when the specific item is inserted in a table. Also, I need to use
QTableWIdgetItem.setData() in order to insert the numeric data or else
the numbers in the table are not sortable.
Do I have to subclass either QVariant or QTableWidgetItem in order to
change the formatting of how numbers are depicted inside of
QTableWidget cells, or is there a more succinct way of doing this?
Thanks!
- Brian
--
Brian Gyss
brian.gyss at gmail.com
More information about the PyQt
mailing list