AutoMoc can't find Q_OBJECT macro even it exists on header file.
I was working about a framework uses Qt, and I made a test app which intended to just print "Hello, world!" on a window, but the text never shows - only empty window appeared.
There was no error, only LOTS of these warnings:
AutoMoc warning --------------- "/home/myname/Desktop/myProject/foo/bar/blah.cpp" The file includes the moc file "blah.moc", but does not contain a Q_OBJECT, Q_GADGET or Q_NAMESPACE macro. AutoMoc: /home/myname/Desktop/myProject/foo/bar/blah.cpp:0: Note: No relevant classes found. No output generated.
But when I checked every
Q_OBJECT exists in every file which
Then why does AutoMoc complains?
My Spec: I am using CentOS 8, Qt 5.12.2 and CMake 3.19.5(I Updated).