trying to repeat the lesson with a connection to the database. Always used the QSqlQuery::exec and it worked. In the example granular before executing the query, pass the query string to QSqlQuery::prepare:
qry->prepare("SELECT position from pos;");
when transferring the obtained request to the model get an empty string.
If you do so:
qry->exec("SELECT position from pos;");
all is normally displayed.
Where to dig?