Hi guys
I need some help i have been trying it for so long but failed to resolve it.
I have created a small application in Qt for andriod that works fine on desktop.
byt when i deploy it to andriod device the connection show its connected but fails to read or write from sqlite database.
i have tried all including qstandard paths, etc.
below is my connection code:
bool connOpen()
{
mydb=QSqlDatabase::addDatabase("QSQLITE");
//mydb.setDatabaseName("C:/Users/Kas/Documents/KFinance/KFinance.db");
mydb.setDatabaseName("KFinance.db");
if(!mydb.open())
{
qDebug()<<("Not Connected");
return false;
}
else
{
qDebug()<<("Connected");
return true;
}
}
it it possible that i copy the sqlite database manually to phone storage location or sd card and then what will be the code to connect it?
i will be thankkful if someone can modify my code above so that it can connect to sqlite db in say phone storage\MyTest dir.
many thanks for your help
I need some help i have been trying it for so long but failed to resolve it.
I have created a small application in Qt for andriod that works fine on desktop.
byt when i deploy it to andriod device the connection show its connected but fails to read or write from sqlite database.
i have tried all including qstandard paths, etc.
below is my connection code:
bool connOpen()
{
mydb=QSqlDatabase::addDatabase("QSQLITE");
//mydb.setDatabaseName("C:/Users/Kas/Documents/KFinance/KFinance.db");
mydb.setDatabaseName("KFinance.db");
if(!mydb.open())
{
qDebug()<<("Not Connected");
return false;
}
else
{
qDebug()<<("Connected");
return true;
}
}
it it possible that i copy the sqlite database manually to phone storage location or sd card and then what will be the code to connect it?
i will be thankkful if someone can modify my code above so that it can connect to sqlite db in say phone storage\MyTest dir.
many thanks for your help