-
http://www.qtcentre.org/threads/32585-QT-amp-sqlite-driver-not-loaded
QT & sqlite - driver not loaded
Hello!
I'm trying to read from sqlite database. I've wrote simple function:
Qt Code:-
{
-
-
QSqlDatabase bdb;
-
bdb. setDatabaseName "/test.db" );
-
bdb. open );
-
-
queryModel ->setQuery "SELECT * FROM t1",bdb );
-
-
ui ->tableView ->setModel (queryModel );
-
}
To copy to clipboard,switch view to plain text mode
test.db is a simple database with one table t1. When I'm trying to read with code above I get error:
Qt Code:sqlite3 to create and use databases. What should I do to make it work?
thanks in advance
best regards
Tomasz21st July 2010,01:15 #2The following user says thank you to wysota for this useful post:
Tomasz(21st July 2010)
I've copied compilled driver (it wasn't there),I've change my code to:
bdb. "./test.db" ); ok = bdb. );Last edited by Tomasz; 21st July 2010 at 10:30.