Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QSqldatabase and QT creator
Qt 6.12 LTS is out! See what's new in the release blog

QSqldatabase and QT creator

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 4 Posters 6.4k Views 1 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    HI All,

    I am working on QSqldatabase and i have following problem.
    I have create connection and but when i compile my code i am facing compilation error that QSqldatabase not declared. I have added in pro file QT += sql but i think something is missing.

    Is there any dll that will add support for QSql ?

    Thanks,
    Neel

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      You are using are using QSqlDatabase, and not QSqldatabase, right?

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        @#include <QSqlDatabase>@

        and as mlong said notice the capitalisation you are using is incorrect.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Did you add the SQL module in your .pro file for the Qt configuration?
          @
          QT+= SQL
          @

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            Also make sure that qmake has been re-run since you added QT += SQL so that the Makefiles (or equivalent) have been updated to include the necessary include and library paths etc.

            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
            • Unsolved