Results 1 to 14 of 14

Thread: Run sqlite application without installing QT

  1. #1
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Run sqlite application without installing QT

    Hi,

    I have an application ( currently on Windows ) which interacts with Sqlite database when I save it, now I could run the application without installing QT. But could not get connected to the database when I save it.

    I have tried to install Sqlite directly to the Windows system, but that did not help me to get connected.

    Is there a way where I can interact with the Sqlite database without installing QT.

    regards.

  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: Run sqlite application without installing QT

    Well, you have to deliver the right libraries/plugins with your application. Then it will work. Look inside your Qt installation path for a folder called something like "sqldrivers" or so. Inside you should find the related lib for SQLite.

  3. #3
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: Run sqlite application without installing QT

    I have tried placing the entire " sqldrivers " folder into my application, but it soesn't work out.

    Could you guide me on this ?

  4. #4
    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: Run sqlite application without installing QT

    Just debug if your application finds the right driver by using
    Qt Code:
    1. qWarning() << QSqlDatabase::drivers();
    To copy to clipboard, switch view to plain text mode 
    Normally it should look like:
    Qt Code:
    1. - Folder with our exe
    2. - plugins
    3. - sqldrivers
    To copy to clipboard, switch view to plain text mode 
    But one week ago I also had trouble with it (even using qt.conf). After removing "plugins" and only have a structure like
    Qt Code:
    1. qWarning() << QSqlDatabase::drivers();
    To copy to clipboard, switch view to plain text mode 
    Normally it should look like:
    Qt Code:
    1. - Folder with our exe
    2. - sqldrivers
    To copy to clipboard, switch view to plain text mode 
    it worked for me.

  5. #5
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Thumbs up Re: Run sqlite application without installing QT

    Thanks a ton ...

    It worked !

  6. #6
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    How do I do the same in Linux ?

  7. #7
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    The same way. Also have a look at your plugin library on system. On my x64 gentoo it looks like that:

    ls /usr/lib64/qt4/plugins/sqldrivers/
    libqsqlite.so libqsqlmysql.so libqsqlodbc.so libqsqlpsql.so libqsqltds.so
    -- Tanuki

    per cauda vel vaculus cauda

  8. #8
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    I have tried copying the plugins folder to my project, but still says "Could not connect to the database !!!"

  9. #9
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    Check the hierarchy of directories. It should resemble the original Qt.
    -- Tanuki

    per cauda vel vaculus cauda

  10. #10
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    Hi

    could not find a solution for this , could you just tell me from where the drivers are being loaded ? If I could get find it I think I would be able to solve the problem.

    thanks and regards

  11. #11
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    How to find out from which path the drivers are being loaded ?

  12. #12
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Question Re: Run sqlite application without installing QT

    How to find out from which path the drivers are being loaded ?

    Its pretty urgent ! can somebody help me out ...

    When I run my application through IDE it works pretty fine but when I run the application individually It doesn't ...

    Have tried to figure out the path from where the drivers are being loaded ? but I couldn't succeed on this front. Can somebody help me ?

    regards

  13. #13
    Join Date
    Nov 2009
    Posts
    29
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    Hi
    First of all I WISH U ALL A VERY HAPPY, PROSPEROUS 'N' SUCCESSFULL NEW YEAR AHEAD ...

    I could find the path from where the drivers are being loaded. QtDir / lib / libQtSql.so , libQtSql.so.4 , libQtSql.so.4.5 , libQtSql.so.4.5.3. But these are " link to shared library files ". So how do I use these files in my application ? Kindly help me out. I could not even copy them to any device, though I have copied to my application folder the application coudn't find the drivers.

    thanks and regards
    Last edited by praveen_g; 1st January 2010 at 06:53.

  14. #14
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Run sqlite application without installing QT

    Try to run something like that (looks like you are Linux/*NIX user):
    find /lib* /usr/lib/* -name "libqsqlite.so" -print
    -- Tanuki

    per cauda vel vaculus cauda

Similar Threads

  1. Replies: 6
    Last Post: 25th April 2011, 07:25
  2. Installing SQLite
    By MIH1406 in forum Installation and Deployment
    Replies: 3
    Last Post: 21st April 2011, 08:45
  3. Installing QT application
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2009, 06:22
  4. Create a windows application with sqlite
    By nittalope in forum Installation and Deployment
    Replies: 9
    Last Post: 6th August 2009, 18:52
  5. installing application on greenphone device
    By prajna in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th April 2009, 09:30

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
  •  
Qt is a trademark of The Qt Company.