Qt-interest Archive, April 2008
Windows XP & the brutal QSQLITE driver not loaded message
Message 1 in thread
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#3333ff">
<font size="+1">Hi,<br>
<br>
Recently, a friend looked at an application I developed using Linux
with QT4 and he asked if I could wave a wand and make it work on his
Windows machine. Knowing that QT4 and QDevelop are cross platform
tools; I said I would oil my magic wand and let him know shortly. My
windows box in computer years is old and very slow. It is a DELL
Dimension 2100 I bought before the age of XP. However, it is running XP
Pro SP2, with QT4 installed. Develpment tool of choice, on both the
DELL and my custom designed machine running UBUNTU Linux is QDEVELOP. <br>
<br>
So, I dropped the package into a folder on the DELL, built my project
file, and built the window binary. OK. This is the main function. It's
not long; it's not complex, it works consistently and constantly under
Linux.<br>
<br>
#include <QApplication><br>
#include <QSqlDatabase><br>
#include <QList><br>
#include "MajOptsimpl.h"<br>
//<br>
QString CompanyName;<br>
QString ContactName;<br>
QList<QString> mylist;<br>
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");<br>
<br>
int main(int argc, char ** argv)<br>
{<br>
bool tsw;<br>
QString mystr;<br>
QApplication app( argc, argv );<br>
db.setDatabaseName("Contacts.DB");<br>
tsw = db.open();<br>
mystr= db.driverName(); <br>
MajOptsImpl win;<br>
win.show(); <br>
app.connect( &app, SIGNAL( lastWindowClosed() ), &app,
SLOT( quit() ) );<br>
return app.exec();<br>
}<br>
<br>
It compiles and builds under XP and yet, when it runs, I get the
QSQLITE driver not loaded. Available Drivers. and there are no
available drivers. Oh sure there are. They are all in the plugins
sqldrivers folder. I used the Troll archives and tried about 15
approaches; all not involving the dreaded configure QT and make
process, which on that poor DELL is a full eight hour operation. But
anon and alack, I think I am at the end of the easy fixes. I have a
copy of qsqlite4.dll in the project folder, and in the binary folder. I
have changed the ::addDatabase("QSQLITE") to </font><font size="+1">::addDatabase("QSQLITE4").
Nothing but a repeat of the problem. The only thing left I think which
might work is to configure from scratch again using these parameters: <br>
<br>
configure -qt-sql-sqlite -debug-and-release <br>
<br>
And, on conclusion of the above statement,<br>
<br>
make with no options.<br>
<br>
If there is anything you know of which might work better, faster, or
encompass any other shred of information on this topic, I would be
thrilled to both read and try it.<br>
<br>
Thanks,<br>
<br>
<br>
Robert<br>
</font>
</body>
</html>
--
[ signature omitted ]