1

I want to add sound to my program so I need to add header file “QSound”.

To add the header file, I need to modify the .pro file.

The problem is, I use visual studio to develop projects, so I can't find the .pro file.

I am so confused.

Thanks for your help!

drescherjm
  • 10,365
  • 5
  • 44
  • 64
liushi
  • 83
  • 7

2 Answers2

2

If you're using Qt VS Tools, use Create Basic .pro File from extensions menu. Note that .pro and .vcxproj files might not be in sync so if possible use Qt Creator to configure your project in the .pro file and then open the project in visual studio via Open Qt Project File

Omid
  • 286
  • 1
  • 5
  • 20
1

Note that if you are using MS Visual Studio and Qt, and you need to add a specific qt module to your project, you do not need to have a .pro file just for that. That would be the way to go when not using VS.

Instead, in Visual Studio select your project, select menu "Project / Properties", there you should have an entry "Qt Project Settings", and there a section "General", there a setting "Qt Modules" which probably already contains "core" and some entries.

Add your module to this line. Remember to do that for all your configurations and platforms.

Qt Modules in Visual Studio

ray_ray_ray
  • 316
  • 1
  • 14