QMake: Automatically compiling all files in a directory

前端 未结 2 1830
轻奢々
轻奢々 2021-01-01 15:47

For my Qt project, I use a .pro file that includes a separate .pri file for the various header, source, form and resource files. However, every time I add a new file I need

2条回答
  •  长情又很酷
    2021-01-01 16:53

    You can use:

    SOURCES += *.cpp
    HEADERS += *.h
    

    in your pro file. Of course you still have to remember to re-run qmake after creating new files.

提交回复
热议问题