When you remove source files from the .pro then these won't be compiled.
When you remove headers files from the .pro then these won't be used as input for moc. However they can still be included by source files or other headers which are still being built.

Cheers,
_