Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 6

Qt-interest Archive, April 2007
QSqlTableModel and Delegates


Message 1 in thread

Hello List,
i have a QSqlTableModel which is filling a QTableView. To change what is 
coming out of the Db i use a Filter on the Model.

My problem is, i want to display some of the Entrys differently than 
they are provided by the Database. For Ex. a unixtimestamp is not very 
human readable so i would like to convert it to a nice String. Others 
are very nice as they come out of the Db and can just be displayed as is.

Is writing a Delegate the right solution? Or would i have to write a 
custom Model to be able to adjust/convert the Values? I m thinking of 
writing a Custom Model anyway because i might need some extra entrys 
besides the one that come out of the Db.
As i m very new to MVC in Qt4 i dont want to get stuck in the wrong place.

Thank you


Cheers
Manuel

--
 [ signature omitted ]