Results 1 to 5 of 5

Thread: Problem deploying qt application using qsqlite on Windows XP/7

  1. #1
    Join Date
    Nov 2010
    Location
    Cienfuegos, Cuba
    Posts
    16
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Problem deploying qt application using qsqlite on Windows XP/7

    Hi. On my research I found that is a very common problem, reading another post I tried to fix this but I' can't. I have a problem with my Qt application that is using qsqlite.dll. The structure of the folder where the app resides is:

    app/app.exe
    app/qtcore4.dll
    app/qtgui4.dll
    app/qtsql4.dll
    app/data.db3
    app/sqldrivers/qsqlite.dll

    With this structure I have deployed another applications but with this one I'm having problems. The application loads the main widget but when loading, the QSqlDatabase::lastError().text() raises with the message Driver not loaded Driver not loaded.

    Some ideas please?

  2. #2
    Join Date
    Apr 2011
    Posts
    5
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem deploying qt application using qsqlite on Windows XP/7

    Hi,

    The qsqlite dll I have is named 'qsqlite4.dll', yours seems to be 'qsqlite.dll', check whether this might be the problem on your side.

  3. The following user says thank you to jwjoshua for this useful post:

    anoraxis (8th April 2011)

  4. #3
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Problem deploying qt application using qsqlite on Windows XP/7

    Maybe try this way:
    app/app.exe
    app/...
    ...
    app/plugins/sqldrivers/qsqlite.dll
    and add plugins path for qApp:
    Qt Code:
    1. QDir::setCurrent( QCoreApplication::applicationDirPath() );
    2. qApp->addLibraryPath("plugins");
    To copy to clipboard, switch view to plain text mode 

  5. #4
    Join Date
    Nov 2010
    Location
    Cienfuegos, Cuba
    Posts
    16
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem deploying qt application using qsqlite on Windows XP/7

    The problem with the missing .dll was solved. The qsqlite4.dll file that I was including with my application isn't the correct one.

    I'm using the qt-sdk-open source-4.5.0 so the data I will expose is according to this version. When a search is made on C:\Qt (where the sdk is normally installed) for the file qsqlite4.dll we get the following results:

    ************************************************** **********

    Name | Folder | Size
    -------------+----------------------------------------------+-------
    qsqlite4.dll | C:\Qt\2009.01\bin\sqldrivers | 340 KB
    qsqlite4.dll | c:\Qt\2009.01\qt\plugins\sqldrivers | 391 KB

    ************************************************** **********

    I was initially including the first one, and the correct dll to include is the one with 391 KB. My fault!!!

    Now I have a question. What's about the qsqlite4.dll of 340 KB file?

  6. #5
    Join Date
    Aug 2009
    Location
    Greece
    Posts
    69
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem deploying qt application using qsqlite on Windows XP/7

    Now I have a question. What's about the qsqlite4.dll of 340 KB file?
    this is the one used by qtcreator compiled with VC

  7. The following user says thank you to Rhayader for this useful post:

    anoraxis (8th April 2011)

Similar Threads

  1. Problem deploying a two library + executable application to windows
    By joseprl89 in forum Installation and Deployment
    Replies: 8
    Last Post: 15th March 2011, 21:52
  2. Font problem when deploying a Qt-based application to Ubuntu 10.10
    By dictoon in forum Installation and Deployment
    Replies: 8
    Last Post: 13th March 2011, 21:26
  3. Replies: 3
    Last Post: 21st February 2011, 01:20
  4. Deploying an application on windows
    By dmcr in forum Installation and Deployment
    Replies: 1
    Last Post: 23rd September 2009, 10:23
  5. problem with deploying static application in windows
    By remy06 in forum Installation and Deployment
    Replies: 3
    Last Post: 2nd June 2009, 07:46

Tags for this Thread

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.