G'Day,

I have a QSqlTableModel being displayed in a QTableView and the data comes from an Sqlite database.

The data to be displayed is of type double (valid data is 0.0 to 15.0) and it all displays correctly except when the data ends in ".0". So "13.2" displays as "13.2", "14.5" displays as "14.5" however "15.0" displays as "15", "12.0" displays as "12". When editing the data it displays correctly as I have created my own DoubleSpinBox delegate and set the maximum, minimum, step and decimals to my needs. Editing works, just the displaying prior to editing that is not how I would like it.

I managed to work out how to fix the editing side of it but I am stumped with the display side. I am still getting my head around the model concept.

Any suggestions on where to look, read, or how to go about solving this would be appreciated. Its not a show stopper, I would just like it to look consistent.

Thank you, B1.