I am trying to create a SQLite database in Qt. Here is my code:
QDir databasePath;
QString path = databasePath.currentPath()+"myDb.db";
QSqlDatabase dbConnection = QSqlDatabase:addDatabase("QSQLITE");
db.setDatabaseName(path);
db.open();
There are no errors when running the code, but I can't find the database I created in the path I defined. Does this actually create the database or does it just do some initialization?
If it does not create the database then how do I create the database within the application itself? (I am not talking about insertion.)