I need to display a property browser under a MFC app.

I try to combine and compile the solution for the two

http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Windows/qtwinmigrate/
http://qt.nokia.com/products/appdev/...opertybrowser/

I am using VC2009, QT 2009.04 with Visual Studio Add-On 1.1.1

Take note, under my machine, there are no problem for me to compile them successfully separately.

I copy, and add all exsiting CPP and HEADER files found in

Qt Code:
  1. qtpropertybrowser-2.5-opensource\src
To copy to clipboard, switch view to plain text mode 

into

Qt Code:
  1. qtwinmigrate-2.8-opensource\examples\qtdll
To copy to clipboard, switch view to plain text mode 

Here is how my new project looks like in the screen shoot (qtwinmigrate - windows at right most)



The qtpropertybrowser, is the project which I am able to compile with no problem :

Qt Code:
  1. 1>------ Rebuild All started: Project: simple, Configuration: Release Win32 ------
  2. 1>Deleting intermediate and output files for project 'simple', configuration 'Release|Win32'
  3. 1>Moc'ing qtpropertybrowserutils_p.h...
  4. 1>RCC ..\..\src\qtpropertybrowser.qrc
  5. 1>MOC ..\..\src\qtvariantproperty.h
  6. 1>MOC ..\..\src\qttreepropertybrowser.h
  7. 1>MOC ..\..\src\qtpropertymanager.h
  8. 1>MOC ..\..\src\qtpropertybrowser.h
  9. 1>MOC ..\..\src\qtgroupboxpropertybrowser.h
  10. 1>MOC ..\..\src\qteditorfactory.h
  11. 1>MOC ..\..\src\qtbuttonpropertybrowser.h
  12. 1>Compiling...
  13. .
  14. .
  15. .
  16. 1>Compiling...
  17. 1>moc_qtpropertybrowserutils_p.cpp
  18. 1>Linking...
  19. 1>Embedding manifest...
To copy to clipboard, switch view to plain text mode 

However, when come to build modified version of qtwinmigrate (original version of qtwinmigrate was able to compiled with no problem)

Qt Code:
  1. 1>------ Rebuild All started: Project: qtdialog, Configuration: Release Win32 ------
  2. 1>Deleting intermediate and output files for project 'qtdialog', configuration 'Release|Win32'
  3. 1>Moc'ing qtpropertybrowserutils_p.h...
  4. 1>Moc'ing qteditorfactory.h...
  5. 1>Moc'ing qtvariantproperty.h...
  6. 1>Moc'ing qttreepropertybrowser.h...
  7. 1>Moc'ing qtpropertymanager.h...
  8. 1>Moc'ing qtpropertybrowser.h...
  9. 1>Moc'ing qtgroupboxpropertybrowser.h...
  10. 1>Moc'ing qtbuttonpropertybrowser.h...
  11. 1>Moc'ing qwinwidget.h...
  12. 1>Moc'ing qwinhost.h...
  13. 1>Compiling...
  14. .
  15. .
  16. .
  17. 1>Compiling...
  18. 1>moc_qtpropertybrowserutils_p.cpp
  19. 1>moc_qteditorfactory.cpp
  20. 1>.\Release\moc_qteditorfactory.cpp(74) : error C2027: use of undefined type 'QtSpinBoxFactoryPrivate'
  21. 1> c:\documents and settings\yan-cheng.cheok\my documents\downloads\qtwinmigrate-2.8-opensource\qtwinmigrate-2.8-opensource\examples\qtdll\release\../../../lib/qtpropertybrowser-2.5-opensource/src/qteditorfactory.h(97) : see declaration of 'QtSpinBoxFactoryPrivate'
  22. 1>.\Release\moc_qteditorfactory.cpp(74) : error C2227: left of '->slotPropertyChanged' must point to class/struct/union/generic type
To copy to clipboard, switch view to plain text mode 

My questions is

1. Why qtpropertybrowser just perform "Moc'ing" in 1 file, but qtwinmigrate perform "Moc'ing" in so many files?
2. Why qtpropertybrowser just compile "moc_qtpropertybrowserutils_p.cpp", but qtwinmigrate try to compile so many "moc_....cpp"?