I want to call setItemDelegateForColumn() for a QTableView for each column that is of type blob. However, I can't figure out how to get the column types from QSqlQueryModel.

Also, if an invalid query is entered for QSqlQueryModel::setQuery(), the QTableView is blank. However, I would like it to show the error message returned by the database. I can't figure out how to get the error message from QSqlQueryModel.

Thanks for any help!