[Qt-interest] QTableView and delegate

Arnold Krille arnold at arnoldarts.de
Sat Nov 7 15:25:03 CET 2009


On Thursday 05 November 2009 20:59:42 Wolfgang Pausch wrote:
> if I have a read-only QTableView with a model containing integers in some
> column, and want to translate them into human-readable strings before
> displaying them in the table, what is the best design?

If its a view on a database-table, why not make it a database-sql-query that 
resolves that column for you.

Otherwise I would create a small proxymodel that forwards all requests and 
only translates the numbers of this one column into strings. Sounds like very 
few lines of code...

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091107/8bd756c7/attachment.bin 


More information about the Qt-interest-old mailing list