Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSQLITE driver not loaded
Forum Updated to NodeBB v4.3 + New Features

QSQLITE driver not loaded

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 2.9k Views 2 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.
  • A Offline
    A Offline
    Anh Phan
    wrote on last edited by
    #1

    Hi everyone, I'm quite new to Qt. I'm now making a project which connects to a Sqlite database. When I run it in Debug mode everything seems ok but when i switch to Release mode it says :
    QSqlDatabase: QSQLITE driver not loaded
    QSqlDatabase: available drivers:
    I've searched this problem on many websites but i couldn't solve this problem. Can anyone help me!

    Anh

    NisixN 1 Reply Last reply
    0
    • A Anh Phan

      Hi everyone, I'm quite new to Qt. I'm now making a project which connects to a Sqlite database. When I run it in Debug mode everything seems ok but when i switch to Release mode it says :
      QSqlDatabase: QSQLITE driver not loaded
      QSqlDatabase: available drivers:
      I've searched this problem on many websites but i couldn't solve this problem. Can anyone help me!

      NisixN Offline
      NisixN Offline
      Nisix
      wrote on last edited by
      #2

      @Anh-Phan Hi ! If you use Qt on Windows you need to past the .dll sqlite on your project files too.
      Like this : %pathofproject% /project/debug/ PASTE HERE THE DLL.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Anh Phan
        wrote on last edited by Anh Phan
        #3

        Oh thank you very much. It works perfectly when i run the .exe file in Debug folder, but the .exe file in Release folder still has the old problem.

        Anh

        1 Reply Last reply
        0
        • mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Just to be sure I understand.
          Do you run the RELEASE build from the Creator or
          do you try to run with the .exe in the release folder?

          A 1 Reply Last reply
          0
          • mrjjM mrjj

            Just to be sure I understand.
            Do you run the RELEASE build from the Creator or
            do you try to run with the .exe in the release folder?

            A Offline
            A Offline
            Anh Phan
            wrote on last edited by
            #5

            @mrjj I run both of them and receive the same error.

            Anh

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              did u try to run it from Creator with the SQLIte Dll in RELEASE folder ?

              A 1 Reply Last reply
              0
              • A Offline
                A Offline
                Anh Phan
                wrote on last edited by
                #7

                I will give it a try

                Anh

                1 Reply Last reply
                0
                • mrjjM mrjj

                  did u try to run it from Creator with the SQLIte Dll in RELEASE folder ?

                  A Offline
                  A Offline
                  Anh Phan
                  wrote on last edited by
                  #8

                  @mrjj i tried but it still has this problem.

                  Anh

                  mrjjM 1 Reply Last reply
                  0
                  • A Anh Phan

                    @mrjj i tried but it still has this problem.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Anh-Phan
                    Ok.
                    Can you try with this test project
                    https://www.dropbox.com/s/2ggexvrbeciiepw/dbtest.zip?dl=0
                    Works for me both in DEBUG and RELEASE
                    running from Creator.

                    A 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @Anh-Phan
                      Ok.
                      Can you try with this test project
                      https://www.dropbox.com/s/2ggexvrbeciiepw/dbtest.zip?dl=0
                      Works for me both in DEBUG and RELEASE
                      running from Creator.

                      A Offline
                      A Offline
                      Anh Phan
                      wrote on last edited by
                      #10

                      @mrjj I ran it but it still works only in DEBUG mode, in RELEASE it still has QSqlDatabase: QSQLITE driver not loaded error. I'm kinda confused now.

                      Anh

                      mrjjM 1 Reply Last reply
                      0
                      • A Anh Phan

                        @mrjj I ran it but it still works only in DEBUG mode, in RELEASE it still has QSqlDatabase: QSQLITE driver not loaded error. I'm kinda confused now.

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        @Anh-Phan
                        Ok , at least its consistent. :)

                        Do you use mingw or Visual studio ?
                        I assume you just use the online installer to install Qt and
                        have not compiled Qt yourself.

                        It must be a some sort of path problem.

                        Im confused too :)

                        A 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @Anh-Phan
                          Ok , at least its consistent. :)

                          Do you use mingw or Visual studio ?
                          I assume you just use the online installer to install Qt and
                          have not compiled Qt yourself.

                          It must be a some sort of path problem.

                          Im confused too :)

                          A Offline
                          A Offline
                          Anh Phan
                          wrote on last edited by
                          #12

                          @mrjj i use mingw48_32 to compile, bro.

                          Anh

                          mrjjM 1 Reply Last reply
                          0
                          • A Anh Phan

                            @mrjj i use mingw48_32 to compile, bro.

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by mrjj
                            #13

                            @Anh-Phan
                            Hmm . me too.
                            Sorry I have really no idea how it cannot work when release.

                            Did you install using the online installer ?
                            Have you compiled anything yourself?

                            Can i try your project?

                            A 1 Reply Last reply
                            0
                            • mrjjM mrjj

                              @Anh-Phan
                              Hmm . me too.
                              Sorry I have really no idea how it cannot work when release.

                              Did you install using the online installer ?
                              Have you compiled anything yourself?

                              Can i try your project?

                              A Offline
                              A Offline
                              Anh Phan
                              wrote on last edited by
                              #14

                              @mrjj Yep, i used the online installer.

                              Anh

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                Hi,

                                Maybe a silly question, but did you check that you currently have the corresponding .dll file in your Qt installation folder ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                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