[Interest] QTableView column format

Muhammad Bashir Al-Noimi mbnoimi at gmail.com
Tue Jan 28 21:45:34 CET 2014


On 01/25/2014 11:54 AM, Andre Somers wrote:
> Your delegate is dealing with the editor, but not with the display. Try
> reimplementing the displayText method. Also, check if the data type you
> get from the database really is numerical. SQLite can be weird with data
> types in my experience.
Ignore the last message please I fixed this issue by using:
---
QString EcsLongDigitDelegate::displayText(const QVariant &value, const 
QLocale &locale) const
{
     QLocale::UnitedStates;
     return QString::number(value.toDouble(), 'f', 5);
}
---

Thanks you Andre

-- 
Best Regards,
Muhammad Bashir Al-Noimi




More information about the Interest mailing list