Results 1 to 2 of 2

Thread: Driver not loaded (sqlite) at Ubuntu

  1. #1
    Join Date
    Oct 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Driver not loaded (sqlite) at Ubuntu

    HI!
    I try to create and connect to Database with Qt 5.0.0 and Ubuntu 12.04LTS;

    Qt Code:
    1. db=new QSqlDatabase();
    2. db->addDatabase("QSQLITE");
    3. qDebug()<<this<<__FUNCTION__<<__LINE__<<db->lastError().text();
    To copy to clipboard, switch view to plain text mode 

    db says: Driver not loaded;

    I copy libqsqlite.so at Qt/gcc/plugins/sqldrivers/libqslite.so to /myproject/sqldrivers/libqslite.so;
    but no result;


    And i do this:
    Qt Code:
    1. a.addLibraryPath(a.applicationDirPath()+"sqldrivers/");
    To copy to clipboard, switch view to plain text mode 

    How to add driver into my Project?
    Last edited by Simplevolk; 8th February 2013 at 14:19.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Driver not loaded (sqlite) at Ubuntu

    addDatabase is static! You might want have a look at the given example in the detailed description of QSqlDatabase.

Similar Threads

  1. QT & SQLite - driver not loaded
    By Tomasz in forum Newbie
    Replies: 5
    Last Post: 15th June 2014, 11:59
  2. Driver not loaded with sqlite
    By SIFE in forum Qt Programming
    Replies: 2
    Last Post: 9th September 2013, 12:40
  3. Replies: 2
    Last Post: 20th October 2012, 10:06
  4. Android / necessitas: SQLITE error ("Driver not loaded")
    By Al_ in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 28th August 2011, 15:06
  5. SQlite driver not loaded error
    By ibergmark in forum Installation and Deployment
    Replies: 2
    Last Post: 17th March 2008, 01:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.