on windows Qt also creates file with databasename in app directory.
but if you this like this
Qt Code:
  1. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  2. db.setDatabaseName(":memory:");
To copy to clipboard, switch view to plain text mode 
then the database will be allocated in memory.