PDA

View Full Version : Warning: No relevant classes found?



zgulser
27th February 2009, 07:07
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.

caduel
27th February 2009, 08:19
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.

jpn
27th February 2009, 13:27
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.

caduel
27th February 2009, 13:41
(Ok. But I get dependecies (in the makedepend sense) even if I do not add the an included heaer to the HEADERS.)

jpn
27th February 2009, 14:03
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.

jeffrodrigo
30th September 2010, 00:42
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.