First, I created a QtWidgetApplication in Visual Studio.
Then, I made some changes in Project Properties.
(1) Output Directory: $(SolutionDir)..\..\bin\win32
(2) Intermediate Directory: $(ProjectDir)build\$(Configuration)
(3) Working Directory: $(SolutionDir)..\..\bin\win32
(4) Additional Include Directories: $(Solution)..\..\include
(5) Additional Library Directories: $(Solution)..\..\lib\win32
After setting up the Project Properties, I build the project and run the ouput executable. It works successfully. And then I pressed "Create Basic .pro File" so that I could open and edit in QtCreator (if I want to). However, in the .pro file that VS created, I found that
Moreover, After opening .pro file with QtCreator, I tried to build the project, but an error showed up:
Indeed, After I checked the Intermediate Folder created by QtCreator, I didn't find 'ui_qtwidgetsapplication1.h'.
It looks like that
the directory of Generated Files created by Visual Studio are: (Inside the Project Folder)
And the directory of Generated Files created by QtCreator are: (Outside the Project Folder)
It looks like that Visual Studio has some bugs when "Creating Basic .pro File".
(1) Why doesn't DEPENDPATH have "$(SolutionDir)../../include"??
(2) Why doesn't DESTDIR have "$(SolutionDir)"??
(3) Does $(SolutionDir) work in QtCreator? (I guess not) Then, Does that mean that I had better not use VS-default variables in Project Properties??
(4) Why MOC_DIR, UI_DIR, RCC_DIR are "."??
(5) Why didn't QtCreator create 'ui_qtwidgetsapplication1.h'?