Quote Originally Posted by kernel_panic View Post
is there a function which gets all header-columns?
QSqlQueryModel::headerData()
does anybody know how the QSqlTableModel gets the header-data?
It asks the database, but the queries depend on the database you use (unless it supports the standard information_schema schema).

QSqlQueryModel::record() or QSqlDatabase::record() and QSqlRecord::fieldName() might be helpful.