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. 58: error: QSqlRelationalDelegate: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

58: error: QSqlRelationalDelegate: No such file or directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 581 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.
  • G Offline
    G Offline
    Gianfranco Facchini
    wrote on 6 Apr 2018, 17:49 last edited by
    #1

    Hello, I'm a new aspiring programmer in QT. I'm following the example books.
    When I try build project I have this error:
    .. \books\bookdelegate.h:58: error: QSqlRelationalDelegate: No such file or directory

    In file i have declare :
    #include <QSqlRelationalDelegate>

    when i build i use C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe
    what is the problem?

    be patient, I'm a programmer but now I'm starting to study C ++ and QT.

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on 6 Apr 2018, 18:58 last edited by
      #2

      Do you have QT += sql in your project file (.pro)?

      1 Reply Last reply
      3
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 6 Apr 2018, 20:21 last edited by
        #3

        Hi and welcome to devnet,

        To add to @mchinand, don't forget to re-run qmake before building after adding QT += sql to your .pro file.

        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
        3
        • M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 7 Apr 2018, 07:58 last edited by mrjj 4 Jul 2018, 08:04
          #4

          Hi
          A slightly longer story
          When the Qt feature lives in a module
          http://doc.qt.io/qt-5/qtmodules.html
          Like SQL does.
          The docs tells what to add to the project file. ( the . pro file )
          for that class.
          it looks like
          qmake: QT += name

          often in big box.

          alt text

          • Also can be listed in top box like
            alt text
          1 Reply Last reply
          4

          1/4

          6 Apr 2018, 17:49

          • Login

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