Results 1 to 7 of 7

Thread: syntax error : identifier 'QSqlRelationalDelegate'

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: syntax error : identifier 'QSqlRelationalDelegate'

    I did.
    What's killing me is that the examples have compiled when I compiled QT. I used vs2005 from the command line.
    the funny tthing also is that if I take the complete sql example relationaltable.cpp and paste it into my files, it also fails with the same error.

    Johnny

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: syntax error : identifier 'QSqlRelationalDelegate'

    Did you enable the SQL module for your project?

  3. #3
    Join Date
    Jun 2008
    Location
    Canada
    Posts
    10
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: syntax error : identifier 'QSqlRelationalDelegate'

    Hi,

    I did as i'm using the sql modules reguarly.

    Johnny

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: syntax error : identifier 'QSqlRelationalDelegate'

    Try rewriting the messing code line manually - sometimes you might be pasting some weird whitespaces from an external source and the compiler will complain.

  5. #5
    Join Date
    Sep 2010
    Posts
    22
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: syntax error : identifier 'QSqlRelationalDelegate'

    I just had the same problem. Solution is:
    Go to Project -> Properties -> Configuration Properties -> C/C++ -> Preprocessor
    Add QT_GUI_LIB to Preprocessor Definitions.
    (taken from http://truth2.wordpress.com/2010/09/...compile-error/)

Similar Threads

  1. StyleSheet syntax checking
    By MarkoSan in forum Qt Programming
    Replies: 5
    Last Post: 30th June 2008, 10:09
  2. lib("dnsapi")
    By CHeader in forum Newbie
    Replies: 10
    Last Post: 16th February 2008, 19:21
  3. Refreshing syntax highlighting
    By jpn in forum Qt Programming
    Replies: 3
    Last Post: 26th July 2006, 20:09
  4. #ifndef syntax error
    By cbeall1 in forum Qt Programming
    Replies: 6
    Last Post: 14th February 2006, 09:29
  5. A Qt4 editor part with syntax highlighting and stuff?
    By mgoettsche in forum General Discussion
    Replies: 3
    Last Post: 22nd January 2006, 16:32

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
  •  
Qt is a trademark of The Qt Company.