I was trying Ceniza's suggestion to try to make Code::Blocks work the Qt and its moc build step, but the output target for .h files is locked as .h.pch or something like that. It didn't seem to be a very flexible system.
I don't use Qt and therefore also not moc.
I looked in the moc-documentation to find out something about its command-line options.
If you right-click your .h-file (in the Manager) and chose properties you can create a coustom-build-command like "moc -E $file -o $file_dir/moc_$file_name.cpp" (tab "Advanced").
Don't forget to check compile on the "Build"-tab.
To make sure your moc_*.cpp file is created before compiling the other files you should decrease the priority-weight of the file (to 40 for example).
Other command macros you can use can be found under "Settings -> Compiler and Debugger -> Global Compiler Settings -> Other Settings (the right-most tab) -> Advanced Options".
As I wrote, I don't use Qt, so I could only test it with a .h file preprocessed with g++ instead of moc, that works fine, even it does not make much sense in the moment.