I can't add a database to resources:
#include "QtSql/QSqlDatabase"
#include <QApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
db.setDatabaseName(":/new/prefix1/database.db");
if (!db.open())
qDebug()<<"ERRR"; // this line is printed at startup
return a.exec();
}
the database is present in resources: