Results 1 to 4 of 4

Thread: Error in qsqlrelationaldelegate.h?

  1. #1
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Error in qsqlrelationaldelegate.h?

    Hello,

    I'm having trouble with the database example from chapter 13 of the book. Is it due to an error in the Qt header file?
    .../include/qtsql/../../src/sql/models/qsqlrelationaldelegate.h
    which is included by the header file, QtSql.

    There's a (#ifdef QT_GUI_LIB) statement at line 27 that doesn't appear to be defined anywhere in the Qt installation directory.

    I'm not aware of a need for a QT_GUI_LIB preprocessor directive. However, creating one makes the problem go away ... properly building the example.

    BTW another (#ifdef QT_GUI_LIB) statement is found at line 153 of file:
    .../include/qtsql/../../src/tools/qtestlib/src/qtest.h

    Thanks,
    Ben

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error in qsqlrelationaldelegate.h?

    Quote Originally Posted by brcain
    Is it due to an error in the Qt header file?
    No, each module has its own directive that qmake defines when you add given module to QT variable in the .pro file. Since you don't use qmake, you have to define it manually.

  3. #3
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Error in qsqlrelationaldelegate.h?

    I haven't seen this problem with any other module (e.g. XML, OpenGL) ... assuming that's what you mean by "module".

    Would the problem go away with a commercial license using Visual Studio? This project doens't need a commercial license ... other than the fact that I'm trying to use the Visual Studio IDE. I'm supporting a research effort ... not selling a product.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Error in qsqlrelationaldelegate.h?

    Quote Originally Posted by brcain
    Would the problem go away with a commercial license using Visual Studio?
    I've never tried VS integration, because I don't use VS, but qmake should work. Try vcapp template.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.