WTableView QueryModel Floating Point Display
Added by Joseph Witanto almost 9 years ago
Hi, I'm using WTableView and QueryModel to display float from database
In database, it's showing precise digit (1.4 for example), but in WTableView it's displaying 1.39999999
I know it's because of how the floating point is stored
How can I display the rounded value of that variable? Thanks very much :)
Replies (2)
RE: WTableView QueryModel Floating Point Display - Added by Koen Deforche almost 9 years ago
Hey,
You can use setTextFormat() on the item delegate used for the whole table or the specific column.
Koen
RE: WTableView QueryModel Floating Point Display - Added by Joseph Witanto almost 9 years ago
thanks for the answer Koen :D
It's working correctly
I'm sorry I didn't check the examples first, it is included at chart example