I use this to create a table whick is a variable "tableName", why the following codes doesn't woek:
Qt Code:
  1. QSqlQuery build;
  2. build.exec( QString("create table %1 ("
  3. "id INTEGER PRIMARY KEY AUTOINCREMENT,"
  4. "name VARCHAR(90)"
  5. "author VARCHAR(50)"
  6. "copy INTEGER"
  7. "press VARCHAR(120))").arg( name) )
To copy to clipboard, switch view to plain text mode 

and before these codes, I have open the database.
Thanks in advance.