add Qt to existing Visual Studio c++ project
c++, qt, visual-studio
Solution
Thank to Arno Duvenhage and Tom for their answers. Here are steps who worked for me in Qt 5.2.1 and Visual Studio 2012 and 2015:
Install QT Add In (for visual studio 2015 is in still in beta, but works fully for me).
Right click the project, select "Unload project".
Add add the `<keyword>Qt4VSv1.0</keyword>` entry into the `<PropertyGroup Label="Globals">` tag.
Select load project.
Select "Convert project to Qt Add-in project" in "Qt 5" menu.
Almost done. Go to Qt project settings and Qt option in the Qt menu to set details.
In your project properties Linker\Additional Library Directories\ might need to add $(QTDIR)\lib
In your project properties C++\Additional Include Directories\ might need to add $(QTDIR)\include
In each of your classes derived from Q_OBJECT, delete the Q_OBJECT macro, save the file, return the Q_OBJECT macro (Ctrl+Z), and save again. It adds the 'moc' files to your generated files folder.
Set your project as startup project.
Problem
I've got an existing Visual Studio C++ project. It creates a main window using GLUT and also uses glut for a right-click context menu. All I want to do now, is to open a second window used as a property inspector to display and change some values. Everyone recommends using Qt for GUI development, but all the tutorials I find discuss either working in Qt creator or how to create a Qt project from scratch. I have used Qt some years ago to do something similar and it was not so difficult to add it to my project. Can anyone explain, or point me to a tutorial explaining how to do this? thanks!