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. [SOLVED]QSqlDatabase

[SOLVED]QSqlDatabase

Scheduled Pinned Locked Moved General and Desktop
24 Posts 5 Posters 12.0k Views
  • 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.
  • P Offline
    P Offline
    panosk
    wrote on 17 Apr 2013, 21:29 last edited by
    #21

    Are you including <QSqlDatabase> in the file where you are trying to establish the connection? Also,
    try to get the list of available drivers with QSqlDatabase::drivers().

    1 Reply Last reply
    0
    • F Offline
      F Offline
      FreeQy
      wrote on 17 Apr 2013, 21:38 last edited by
      #22

      That's what I include:
      !http://i47.tinypic.com/2hfnyhk.jpg(include)!

      And it still gives me error, for the drivers():
      @C:\Users\Nick\Documents\QT_Projects\HotelManagement\mainwindow.cpp:38: error: undefined reference to `_imp___ZN12QSqlDatabase7driversEv'@

      1 Reply Last reply
      0
      • F Offline
        F Offline
        FreeQy
        wrote on 17 Apr 2013, 21:43 last edited by
        #23

        OMG, that was crazy haha
        i had in my .pro file
        @QT += core gui@
        and i thought that i had to just add the 'sql' like the methods below...
        and that's why it didn't work...
        ooooh my goood

        thanks a lot guys, and sorry for disturbing so much

        SOLVED

        1 Reply Last reply
        0
        • P Offline
          P Offline
          panosk
          wrote on 17 Apr 2013, 21:46 last edited by
          #24

          Nice, don't forget to mark your thread's title as [SOLVED].

          1 Reply Last reply
          0

          21/24

          17 Apr 2013, 21:29

          • Login

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