how to execute sqlite command line with QtSql module database connection?
Solved
General and Desktop
-
i need to create a new sqlite database. with sqlite command line tool, i'd use the following command to do so:
> sqlite3 file.db "VACUUM;"
how can i do the same with
QtSql
module? -
Simply open a QSqlDatabase with QSQLITE and specify your desired file name.
-
okay, and do you know if there is a way to specify the schema file from which to create the db?
-
I don't know what a schema file is and how it looks like but I know this is not supported out-of-the box