Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QSqlDatabase has driver but cannot use it

QSqlDatabase has driver but cannot use it

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 697 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sharethl
    wrote on last edited by sharethl
    #1

    I have PC version Qt and embedded Linux Qt,
    a sqlitecipher plugin driver is compiled for both platforms, but QSqlDatabase cannot use it to process database.
    Is there any mistake I have when compiling Qt for embedded Linux?

    Code:

    qDebug() << QSqlDatabase::drivers();
    QSqlDatabase dbconn = QSqlDatabase::addDatabase("SQLITECIPHER");
    dbconn.setDatabaseName("database.lib");
    dbconn.setPassword("correctPW");
    qDebug() << dbconn.tables();'
    

    Here is the debug output:
    ("QSQLITE", "SQLITECIPHER")
    correctPW ---------(Note: I put a debug() in plugin library, embedded linux version cannot show it.)
    (all table names can be seem in PC version, but not embedded linux)

    Configure for Qt:
    ./configure -v -prefix /home/name/qt5/ -release -opensource -qt-libpng -qt-zlib -qt-libjpeg -plugin-sql-sqlite -widgets -qt-sql-sqlite -make libs -no-cups -no-nis -no-iconv -no-dbus -no-openssl -no-iconv -no-sse2 -no-c++11 -xplatform linux-arm-gnueabi-g++ -nomake tools -nomake examples -nomake tests -no-glib -strip -linuxfb -I /usr/local/tslib/include -L /usr/local/tslib/lib -confirm-license

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sharethl
      wrote on last edited by
      #2

      One solution is in test program's .pro file, add reference:
      also need to copy library files to plugins/sqldrivers/ folder.

      unix:!macx: LIBS += -L$$OUT_PWD/../sqlitecipher/ -lsqlitecipher
      INCLUDEPATH += $$PWD/../sqlitecipher
      DEPENDPATH += $$PWD/../sqlitecipher
      
      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved