Em Segunda-feira 24. Agosto 2009, às 07.59.22, Tony Rietwyk escreveu:
> It would be nice if the moc output from the headers could be just compiled
> with the associated cpp file, instead of producing a separate obj file.
There's no switch for forcing that. There is, however, this:
> Alternatively, if I always include the moc
> in the cpp, will qmake suppress compiling the moc output separately?
Yes. QMake detects whether the moc output was included by the .cpp file. If it
is, then it doesn't generate the compilation rule for the file.
Just be careful because the output names have to be of a specific format. See
the Qt unit tests in http://qt.gitorious.org/qt/qt/trees/tests/auto for
examples of included moc outputs with qmake.
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Development Frameworks
Sandakerveien 116, NO-0402 Oslo, Norway
Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14 San Francisco, California: Nov 2 - 4
Qt-interest mailing list