PDA

View Full Version : Setting Format in a QStyledItemDelegate



Airswoop1
1st June 2009, 22:01
I am currently using a wrapper model as well as a QSortFilterProxyModel to compose a Model/View design. I am attempting to format my view using a QStyledItemDelegate, but am running into issues regarding how to render the data in a specific format i.e. PriceFormat would change the model data of 0.4 to $0.40 or StockID would change a stock number 893493 to 893-493. The problem is incurred because the data from the model consists of various types and I cannot show the specific format on the screen. If anyone has any input on such a problem that would be most helpful.