Hello, I'm trying to do anything like this

Qt Code:
  1. QSqlQuery *query = new QSqlQuery();
  2. QFile file("querys.sql");
  3. file.open(QFile::ReadOnly|QFile::Text);
  4. query.exec(file.readAll());
  5.  
  6.  
  7. //querys.sql
  8. CREATE TABLE foo(id int, name varchar);
  9. CREATE TABLE bar(id int, name varchar);
  10. ....
To copy to clipboard, switch view to plain text mode 

but only the first query is executed