Hello,
Apologies I realize this question gets asked a lot, but cannot find the answer.
My existing sqlite db is found and opened when running the simulator in my win7 dev environment. The db file is searched for (and found) under %CURRENT_USER%.
When deploying to N8, the file is never found. Looks like the app always looks in c:\ location and can never find the file.
In my PRO file I have:
QT += core \
gui \
sql
database.sources = mydb.db.sqlite
database.path = .
DEPLOYMENT += database
My db open routine:
bool DatabaseManager:penDB()
{
// Find QSLite driver
db = QSqlDatabase::addDatabase("QSQLITE");
// http://doc.trolltech.com/4.5/sql-driver.html#qsqlite
QString path(QDir::home().path());
path.append(QDir::separator()).append("mydb.db.sqlite");
path = QDir::toNativeSeparators(path);
db.setDatabaseName(path);
// Open databasee
return db.open();
}
The file in question (mydb.db.sqlite) is at the same directory level as the pro file.
What am I missing here?
Thanks,
Radu

penDB()


