Run database application from Konqueror
Maybe my problem is very stupid but when i launch my application, that reads a sqlite3 database file, from the console it works good but if I click on the executable I got an error on db.open() and in my home is created a file whose name is the same of the database.
Where is the mistake?
Thanks,
Giuseppe
Re: Run database application from Konqueror
The mistake is that you didn't post any code :).
So please do...
Re: Run database application from Konqueror
Here the code:
Code:
bool MainWindow::createConnection()
{
db.setDatabaseName("gmcdb");
if (!db.open()) {
return false;
}
return true;
}
Thanks
Re: Run database application from Konqueror
A guy of an other forum helped me finding the solution:
Code:
db.
setDatabaseName(QApplication::applicationDirPath() + QDir::separator() + "gmcdb");
Bye