Quote Originally Posted by wysota View Post
Or you can do it on the model level - simply set appropriate values for Qt::TextAlignmentRole.
Indeed, I forgot there was such role.

Quote Originally Posted by cydside View Post
Sorry wysota, where do i have to set the Qt::TextAlignmentRole in a QSqlTableModel?
thanks
Subclass QSqlTableModel and reimplement data() to return desired alignment for Qt::TextAlignmentRole, otherwise call base class implementation.