i did it, and solution is not nice
in general, qt doesn't export any of sqlitefunctions in its sqlite driver. so
you have to add sqlite to your project. you can find version of sqlite used in
qt in its sources (qt/src/3rdparty/sqlite) or if its set to use dynamically
sqlite installed in system you will have to link with it
then you can obtain sqlite handler using handle method of QSqlDriver class.
following is copied from qt docs:
QSqlDatabase db = ...;
QVariant v = db.driver()->handle();
if (v.isValid() && qstrcmp(v.typeName(), "sqlite3*")==0) {
// v.data() returns a pointer to the handle
sqlite3 *handle = *static_cast<sqlite3 **>(v.data());
if (handle != 0) { // check that it is not NULL
...
}
}
then you can use sqlite3 *handle and call sqlite functions (which will be taken
from source/library you linked to project in addition to qt driver, but using qt
connection)
in general its not nice, but it works... nicer way would be to create custom qt
sqlite driver whcih would dowhat you and package it with your program, then you
will not have to have sqlite twice. but i didn't tried this approach so far
On 25. 1. 2010 11:42, greensparker wrote:
>
> can somebody help me to solve this?
>
> Bala
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users