Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Could not open database or xml outside qtcreator installation platform
Mar91 last edited by
I am running on windows 7 + qtcreator 2.0.1, and i am managing an sqlite database: here is the code:
//OPENING AND SETTING UP THE DATABASE
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE",myconn);
db.open() //Returnin false! :(
The xml code has the same behaviour ..
This code works good into win7, so i compiled the app and moved it ( exe+dll ) to xp. I started the application and the db could not be found from the point of view of db.setdatabasename. I installed Qtcreator on xp, and then everything works. It seems that there must be another library hidden somewhere that has xml and database support What do i have to add to my project in order to support sqlite and xml out of the box?
Those are the file i have near my exe:
EDIT: moved to install and deployment, gerolf
Make sure to also ship the Qt plugins.
There are tools to watch which files a application is trying to open available for windows. Those are really great to find out what is missing in a installation. My guess is that you do not have the sqlite plugin in your installation.
giesbert last edited by
You have a distribution problem, which was already often discussed here on DevNet. And it is also described in the docs.
look in "this":http://developer.qt.nokia.com/forums/viewthread/4538/ or "this":http://developer.qt.nokia.com/forums/viewthread/4440/ thread.