qt - QtPropertyBrowser compiler error when adding moc_objectcontroller.cpp to Visual Studio source tree -
I am using QtPropertyBrowser based on the example in the ObjectController
in my project. I use version 5.2.1 of IDE and Qt (I can regenerate the error for QT 4.7 and 4.8).
All moc _ * .cpp
files have been added source tree generated files <$ (Configuration)
. Unfortunately, this results in the following compiler error:
2 & gt; Moc_objectcontroller.cpp 2 & gt; Generated Files \ Release \ moc_objectcontroller.cpp (70): Error C2027: Undefined Type 'Object Controller Private' 2 & gt; C: \ *** \ Guinean \ GenFile \ Release \ ../../ src / objectcontroller.h (45): 'Object Controller Private' 2 & gt; GeneratedFiles \ Release \ moc_objectcontroller.cpp (70): Error C2227: The left class of '-> SlotValueChanged' should be pointing to / struct / union / generic type
when I use the Moc_objectcontroller .cpp
from the source tree (without actually removing the file on the disc), creates the project and runs fine. All other moc _ * .cpp
files is to be in the source tree, otherwise the project will not be linked.
Does anyone know why the compiler generates an error? Do you have any solutions / work?
Edit: Requests for related code files:
- (moc_objectcontroller.cpp)
- (objectcontroller.cpp
- (objectcontroller.h)
This might be your < / P>
Object controller can be personalized * d_ptr; Conflicting with
QScopedPointer & lt; QObjectData & gt; D_ptr;
QWidget / QObject d_ptr is inherited from member variables.
Rename it and try again.
Comments
Post a Comment