Results 1 to 6 of 6

Thread: Warning: No relevant classes found?

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Warning: No relevant classes found?

    Hi,

    I just got an error about moc'ing the .ui files and it says;

    Warning: No relevant classes found. No output generated.

    I was using vs2003 and I installed vs2005 which is the starting point of this error.

    Thanks in advance.

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Warning: No relevant classes found?

    This means that you listed some header files in your .pro file that do not need moc'ing.
    "Regular" C++ classes (without Q_OBJECT and such) do not need to be added to the HEADERS section.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Warning: No relevant classes found?

    Those "regular" headers definitely should be listed in HEADERS for proper dependency checking. One just needs to re-run qmake after removing the Q_OBJECT macro if he wants to get rid of the warning.
    J-P Nurmi

  4. The following 2 users say thank you to jpn for this useful post:

    alamgir (9th May 2011), matt0xff (9th December 2010)

  5. #4
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Warning: No relevant classes found?

    (Ok. But I get dependecies (in the makedepend sense) even if I do not add the an included heaer to the HEADERS.)

  6. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Warning: No relevant classes found?

    Perhaps that's not the case on all supported platforms. According to HEADERS documentation:
    qmake will generate dependency information (unless -nodepend is specified on the command line) for the specified headers. qmake will also automatically detect if moc is required by the classes in these headers, and add the appropriate dependencies and files to the project for generating and linking the moc files.
    J-P Nurmi

  7. #6
    Join Date
    Sep 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: Warning: No relevant classes found?

    Maybe you are trying to inherit from some class witch has some abstract methods.

    For example:
    If you try to inherit fom QGraphicsItem, you must implement the void 'paint' method, or you'll get a "No output generated" error.

Similar Threads

  1. Visual Studio 2005 Express
    By Muzz in forum Installation and Deployment
    Replies: 22
    Last Post: 6th November 2008, 06:21
  2. Program crashes with assert error in xcb_lock.c
    By Valheru in forum Qt Programming
    Replies: 3
    Last Post: 18th November 2007, 19:56
  3. KDE 3.5.0 crash while opening project
    By MarkoSan in forum KDE Forum
    Replies: 2
    Last Post: 19th October 2007, 16:21
  4. Problem at time compilation in traslation of language
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2007, 14:18
  5. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23

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.