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. Error c1083 QtSql
Forum Updated to NodeBB v4.3 + New Features

Error c1083 QtSql

Scheduled Pinned Locked Moved Solved General and Desktop
38 Posts 7 Posters 8.1k Views 3 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    What error ?
    What version of Qt ?
    What OS ?
    How did you install Qt ?

    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
    1
    • 1 Offline
      1 Offline
      123456789
      wrote on last edited by
      #3

      http://prntscr.com/jx3vn6

      version 5.10.1
      windows 10

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

        Did you re-run qmake after modifying the QT += statement ?

        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
        2
        • Prince_0912P Offline
          Prince_0912P Offline
          Prince_0912
          wrote on last edited by Prince_0912
          #5

          Hi @123456789 ,

          • Add QT += sql in .pro file

          • Add this directive into project #include <QtSql>

          after this Go to Menu bar in Qt,

          • Build->Clean All

          • Build->Run qmake

          • Build->Rebuild Project "XYZ".

          1 Reply Last reply
          2
          • 1 Offline
            1 Offline
            123456789
            wrote on last edited by
            #6

            http://prntscr.com/jx4ufz

            1 Reply Last reply
            0
            • 1 Offline
              1 Offline
              123456789
              wrote on last edited by
              #7

              http://prntscr.com/jx4upk

              1 Reply Last reply
              0
              • 1 Offline
                1 Offline
                123456789
                wrote on last edited by
                #8

                @Prince_0912 not alter error

                mrjjM 1 Reply Last reply
                0
                • 1 123456789

                  @Prince_0912 not alter error

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

                  @123456789
                  If you use anything besides the SQLite db type you need to install its
                  client libs/dlls.
                  They are not included in Qt. only Sqlite is.
                  so if you are using MySql, you need its client Dlls installed.

                  1 Reply Last reply
                  1
                  • 1 Offline
                    1 Offline
                    123456789
                    wrote on last edited by
                    #10

                    i have use Sqlite
                    but I can not

                    mrjjM 1 Reply Last reply
                    0
                    • 1 123456789

                      i have use Sqlite
                      but I can not

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

                      @123456789
                      Check again, if you have
                      QT += sql in .pro file
                      in the .pro file.
                      Else it dont know
                      #include <QtSql>

                      1 Reply Last reply
                      0
                      • 1 Offline
                        1 Offline
                        123456789
                        wrote on last edited by
                        #12

                        I have I have done
                        it's nothing
                        @mrjj

                        mrjjM aha_1980A 2 Replies Last reply
                        0
                        • 1 123456789

                          I have I have done
                          it's nothing
                          @mrjj

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

                          @123456789
                          and you completely clean the build folder and rebuild all?

                          1 Reply Last reply
                          3
                          • 1 123456789

                            I have I have done
                            it's nothing
                            @mrjj

                            aha_1980A Offline
                            aha_1980A Offline
                            aha_1980
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            @123456789 and make sure no build artefacts are in the source folder. esp. Makefiles should only be in the build folder.

                            Qt has to stay free or it will die.

                            1 Reply Last reply
                            3
                            • 1 Offline
                              1 Offline
                              123456789
                              wrote on last edited by
                              #15

                              @aha_1980
                              http://prntscr.com/jx91h3

                              JonBJ 1 Reply Last reply
                              0
                              • 1 123456789

                                @aha_1980
                                http://prntscr.com/jx91h3

                                JonBJ Online
                                JonBJ Online
                                JonB
                                wrote on last edited by JonB
                                #16

                                @123456789
                                You'd better just verify that the file named QtSql.h does indeed exist in your Qt installation area, just in case....

                                1 Reply Last reply
                                2
                                • 1 Offline
                                  1 Offline
                                  123456789
                                  wrote on last edited by
                                  #17

                                  not result
                                  [5_1529526202490_main.cpp](Uploading 100%) [4_1529526202490_login.ui](Uploading 100%) [3_1529526202490_login.h](Uploading 100%) [2_1529526202489_login.cpp](Uploading 100%) [1_1529526202489_ex3.pro.user](Uploading 100%) [0_1529526202488_ex3.pro](Uploading 100%)

                                  mrjjM 1 Reply Last reply
                                  0
                                  • 1 123456789

                                    not result
                                    [5_1529526202490_main.cpp](Uploading 100%) [4_1529526202490_login.ui](Uploading 100%) [3_1529526202490_login.h](Uploading 100%) [2_1529526202489_login.cpp](Uploading 100%) [1_1529526202489_ex3.pro.user](Uploading 100%) [0_1529526202488_ex3.pro](Uploading 100%)

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

                                    @123456789
                                    The file upload is broken.
                                    We cant see those.

                                    but please paste the content of the pro file.

                                    and also when time, try the working sample just to be sure its
                                    not something in your Qt installation.
                                    https://forum.qt.io/topic/91752/start-with-the-qtsql-module/15

                                    1 Reply Last reply
                                    0
                                    • 1 Offline
                                      1 Offline
                                      123456789
                                      wrote on last edited by
                                      #19

                                      @JonB
                                      https://we.tl/SfZC5DpYxt

                                      mrjjM 1 Reply Last reply
                                      0
                                      • 1 123456789

                                        @JonB
                                        https://we.tl/SfZC5DpYxt

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

                                        @123456789
                                        If you remove the
                                        Qtdatabase: i;
                                        from login.h
                                        ( class name wrong and syntax also)

                                        The sample compiles fine.
                                        For you it still complains about
                                        #include <QtSql> ?

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

                                          Your code can't be compiled but it has nothing to do with the <QtSql> include.

                                          You should first clean it.

                                          Then, avoid using module wide includes. They are easy to use for quick samples or tests but otherwise they pull in everything the module contains which means that your compile time increases because the compiler will parse all the module includes. Basically: include what you use where you use it.

                                          Then, please re-read the QSqlDatabase class documentation. You're going to make a wrong usage of it.

                                          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
                                          4

                                          • Login

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