DragonionS
DragonionS

Reputation: 183

Qt's QTableView and large numbers

View of high number

How to make it show large numbers in QTableView like 10030232145 and not as 1.02342e+10?

Upvotes: 0

Views: 506

Answers (2)

Caleb Huitt - cjhuitt
Caleb Huitt - cjhuitt

Reputation: 14941

The standard answer for changing how a view displays its data is to investigate your own item delegate.

Upvotes: 1

Arnold Spence
Arnold Spence

Reputation: 22272

One way would be to override data() in your model class to return a QString formatted the way you would like for Qt::DisplayRole items.

Upvotes: 0

Related Questions