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
Qt 6.11 is out! See what's new in the release blog

Error c1083 QtSql

Scheduled Pinned Locked Moved Solved General and Desktop
38 Posts 7 Posters 11.6k 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.
  • 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
          • 1 Offline
            1 Offline
            123456789
            wrote on last edited by
            #22

            @mrjj
            help me

            jsulmJ mrjjM 2 Replies Last reply
            0
            • 1 123456789

              @mrjj
              help me

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #23

              @123456789 Help with what?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • 1 123456789

                @mrjj
                help me

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

                @123456789

                Your code compiled fine for me.
                i had to remove the
                Qtdatabase: i;
                from login.h
                as its not needed and was also wrong syntax.
                Should have been QSqlDatabase i;
                But You dont need to keep the database around as doc says.

                You really should study the Documentation as @SGaist says.

                Without overall understanding of how the SQL system works, it will be hard
                on you to do anything useful.

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

                  @mrjj
                  I just put this as an example.
                  but even if you remove this line of code it gives error

                  jsulmJ 1 Reply Last reply
                  0
                  • 1 123456789

                    @mrjj
                    I just put this as an example.
                    but even if you remove this line of code it gives error

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #26

                    @123456789 What error?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                      @jsulm
                      http://prntscr.com/jxim2p

                      jsulmJ 1 Reply Last reply
                      0
                      • 1 123456789

                        @jsulm
                        http://prntscr.com/jxim2p

                        jsulmJ Online
                        jsulmJ Online
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by jsulm
                        #28

                        @123456789 There is no such header file, it is called Qsql, http://doc.qt.io/qt-5/qsql.html
                        Edit: it is QtSql
                        C/C++ is case sensitive you know

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        JonBJ 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @123456789 There is no such header file, it is called Qsql, http://doc.qt.io/qt-5/qsql.html
                          Edit: it is QtSql
                          C/C++ is case sensitive you know

                          JonBJ Offline
                          JonBJ Offline
                          JonB
                          wrote on last edited by
                          #29

                          @jsulm
                          Note: it's named QSql, not Qsql, which will at least matter under Linux if not Windoze....

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

                            To add to @JonB: the casing on the screenshot is wrong and yes it's important. It's QtSql.

                            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
                              #31

                              http://prntscr.com/jxj4st
                              http://prntscr.com/jxj53y
                              http://prntscr.com/jxj5b5
                              http://prntscr.com/jxj5hw

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

                                @SGaist
                                @JonB
                                @jsulm

                                jsulmJ 1 Reply Last reply
                                0
                                • 1 123456789

                                  http://prntscr.com/jxj4st
                                  http://prntscr.com/jxj53y
                                  http://prntscr.com/jxj5b5
                                  http://prntscr.com/jxj5hw

                                  Prince_0912P Offline
                                  Prince_0912P Offline
                                  Prince_0912
                                  wrote on last edited by Prince_0912
                                  #33

                                  @123456789 Show us Screenshot of .pro file.
                                  i think you did not write in your .pro file.
                                  if not then add it as below:

                                  QT += sql //Case-Sensitive

                                  1 Reply Last reply
                                  0
                                  • 1 123456789

                                    @SGaist
                                    @JonB
                                    @jsulm

                                    jsulmJ Online
                                    jsulmJ Online
                                    jsulm
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #34

                                    @123456789 How did you install Qt?

                                    https://forum.qt.io/topic/113070/qt-code-of-conduct

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

                                      http://prntscr.com/jxjfdv
                                      @Prince_0912

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

                                        http://prntscr.com/jxjmj6
                                        http://prntscr.com/jxjmpx

                                        @jsulm

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • 1 123456789

                                          http://prntscr.com/jxjmj6
                                          http://prntscr.com/jxjmpx

                                          @jsulm

                                          jsulmJ Online
                                          jsulmJ Online
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #37

                                          @123456789 After adding sql in your pro file: did you rerun qmake?
                                          You should try following:

                                          • Delete build directory
                                          • Run qmake
                                          • Build
                                            Also: why did you install 2 MinGW versions?

                                          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