View Full Version : Run database application from Konqueror
jiveaxe
16th October 2007, 16:45
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
marcel
16th October 2007, 16:56
The mistake is that you didn't post any code :).
So please do...
jiveaxe
16th October 2007, 17:09
Here the code:
bool MainWindow::createConnection()
{
db.setDatabaseName("gmcdb");
if (!db.open()) {
QMessageBox::critical(0, Strings::dbOpenErrorTitle,
Strings::dbOpenErrorContent, QMessageBox::Cancel);
return false;
}
return true;
}
Thanks
jiveaxe
17th October 2007, 17:54
A guy of an other forum helped me finding the solution:
db.setDatabaseName(QApplication::applicationDirPat h() + QDir::separator() + "gmcdb");
Bye
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.