View Full Version : representation of numbers in QTableView...
KillGabio
23rd January 2012, 19:36
hi all, the moment the numbers i have pass the millon barrier the QtableView converts them into, for example, 100023e+12....
how can i change that? i want to see them plain numbers and i dont want to change the model column type to QString...
thank u all in advance
ChrisW67
23rd January 2012, 22:08
QStyledItemDelegate specifically QStyledItemDelegate::displayText() and QString::number() if it is just the display (not the editor) you wish to affect.
KillGabio
25th January 2012, 21:41
Are you saying i should reimplement some methods of the class QStyledItemDelegate??? can you show me a little example cause im trying this...
QStyledItemDelegate *display = new QStyledItemDelegate ();
this->ui->data_table->setItemDelegateForColumn (5, display);
with no luck...i ll keep searching
thanks a lot!
wysota
26th January 2012, 01:48
Yes, you should subclass QStyledItemDelegate and reimplement displayText()
KillGabio
26th January 2012, 04:59
will do, thank both :D
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.