On 05/03/2015 11:17 PM, Thiago Macieira wrote: > On Monday 04 May 2015 06:08:55 Nikos Chantziaras wrote: >> On 03/05/15 13:54, Igor Mironchik wrote: >>> Hi guys, >>> >>> I asked before about similar problem on Windows but now I have the same >>> problem on Linux. >>> >>> I have messagebox.cpp file that should be moced, and in the end of the >>> file I do #include "messagebox.moc" >> >> Since you're using qmake, you shouldn't include that. Manual inclusion >> of moc files should only be done when using build systems that are >> unable to do the moc'ing and building on their own. qmake does not need >> that. > > That won't solve the problem. That will allow the compilation to proceed and > will fail at linking. > > The problem is that qmake/moc could not detect that messagebox.cpp has a > Q_OBJECT macro. >
I am still on 4.8.6 (RHEL5) I have been using Qt for a long time now. Since the beginning of time and for a file named misc.cpp, I #include "misc.moc" at the very end. That is what it takes to make it work for me. I use qmake. Bill _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest