[Qt-interest] 'AutoMoc' as prebuild event in msvc2008
j
j at dynamica.org
Mon Dec 14 21:49:16 CET 2009
Hi there,
In setting up my msvc2008 environment for use with Qt-4.6
I found it quite convenient to have an 'AutoMoc' python script
as a prebuild event. The script scans the $(projectDir) recursively
for .h files that contain 'Q_OBJECT' and then runs moc.exe on them,
generating a moc_filename.h in the same folder. the arguments to
moc can be provided as well, so you just need to add the call to
the python script as a prebuild event, add an #include "moc_filename.h"
to your corresponding .cpp file, and all should be well.
the script can be found here:
http://www.dynamica.org/PUB/AutoMoc/AutoMoc.htm
regards,
Jochem van der Spek
More information about the Qt-interest-old
mailing list