包含文件夹没有出现在我的 Qt 项目树中

Include folder does not appear in my Qt project tree

尽管在我的 CMakeLists.txt 文件中使用了 INCLUDE_DIRECTORIES(include),但我的 include 文件夹没有出现在我的项目树中。 正因为如此,MOC找不到我的headers(包含Q_OBJECT宏)并编译它们,从而产生如下错误:

error: LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall DashboardClient::metaObject(void)const

我忘了在我的 CMake 来源中添加我的头文件:

SET(executable_SOURCES
    source/main.cpp
    source/dashboard_client.cpp
    include/dashboard_client.h
)