Hello there,

i've got a problem with an inherited class on base of QAbstractTableModel. The headers are defined like this:

Qt Code:
  1. const QVariant ArticleTableModel::header_names[] = {
  2. tr("ID"),
  3. tr("Name"),
  4. tr("Category"),
  5. tr("Unit"),
  6. tr("Amount"),
  7. tr("Prize"),
  8. tr("Tax"),
  9. tr("Information")
  10. };
To copy to clipboard, switch view to plain text mode 

and called like this

Qt Code:
  1. QVariant ArticleTableModel::headerData(int section, Qt::Orientation orientation, int role) const
  2. {
  3. if (role == Qt::DisplayRole && orientation == Qt::Horizontal)
  4. return header_names[section];
  5. return QVariant();
  6. }
To copy to clipboard, switch view to plain text mode 

Like mentioned above, the strings are not translated correctly, although all values are translated in a language file, which is loaded fine, becaus all other parts are translated right. Only the headers of all of my inherited classes of QAbstractTableModel are _not_ translated.