[Qt-interest] Warning: No relevant classes found. No output generated.

Diego Iastrubni diegoiast at gmail.com
Sat Mar 20 17:12:07 CET 2010


"When you have a hammer everything looks like a nail"

Why did you do that? Do you need any QObject facilities in your new class?
Just remove the file from the HEADERS section in your project is not needed.
Also, if you do need to inherit QObject, don't forget the Q_OBJECT macro, it
wasted me too much time from my life.

On Sat, Mar 20, 2010 at 4:41 PM, M. Bashir Al-Noimi <mbnoimi at gmx.com> wrote:

>  Thanks,
>
> I fixed this issue by inheriting QObject in my class.
>
> --snippet--
>
> class YAffixer : public QObject
>
>
>
> On 20/03/2010 04:25 م, Diego Iastrubni wrote:
>
> No QObjects here... that's all. Remove this *.h from your *.pro.
>
>
> On Sat, Mar 20, 2010 at 4:22 PM, M. Bashir Al-Noimi <mbnoimi at gmx.com>wrote:
>
>>  Hi folks,
>>
>> After creating a new I got warning message tell me:
>>
>> yaffixer.h:0: Warning: No relevant classes found. No output generated.
>>
>> For that my class couldn't return any value, *how I can fix this issue?*
>>
>>
>>  --snippet--
>>
>> #ifndef YAFFIXER_H#define YAFFIXER_H
>> #include <QObject>#include <QFile>#include <QStringList>#include <QVariant>
>> class YAffixer
>> {public:
>>     YAffixer(QStringList patterns, QStringList preffixes, QStringList suffixes);
>>     YAffixer(QString patternsFilePath, QString preffixesFilePath, QString suffixesFilePath);
>>     QStringList patterns();
>>     QStringList preffixes();
>>     QStringList suffixes();
>>     QStringList calculate();
>>     void saveToFile(QString filePath);private:
>>     QStringList pat, pfix, sfix, res;
>> };
>> #endif // YAFFIXER_H
>>
>>
>>  --
>> Best Regards
>> Muhammad Bashir Al-Noimi
>> My Blog: http://mbnoimi.net
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
> --
> Best Regards
> Muhammad Bashir Al-Noimi
> My Blog: http://mbnoimi.net
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100320/def7890b/attachment.html 


More information about the Qt-interest-old mailing list