How to use moc in a qmake project that doesn't use Qt modules?

258 views Asked by At

I have a qmake project that includes the needed Qt source files directly, thus I don't need to link with any Qt libraries:

TEMPLATE = app
CONFIG -= qt

Yet the removal of Qt support also forces qmake not to process any headers with moc. Is there a workaround?

1

There are 1 answers

0
Kuba hasn't forgotten Monica On

Yes:

CONFIG += moc

This causes the mkspecs/features/moc.prf to be included by qmake, adding moc to its repertoire.