Qt+MySql. Why prepare is not processed after the exec?

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;");
qry->exec();

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?
June 7th 19 at 15:03
1 answer
June 7th 19 at 15:05
Solution
The problem is a bad client mysql driver. How to solve the windows is not clear, switched to linux, everything is OK.

UPDATE: launched a 32-bit Oracle the MySql server on Windows, copied it to the lib folder of the library libmysql.dll in the folder with the executable file project and it worked. Apparently Qt does not have a precompiled driver.

Find more questions by tags MySQLQt