Qt 6.12 LTS is out! See what's new in the release
blog
How to use QSound on Visual Studio?
-
I'm trying to use QSound lib in my project, but it didn't find the include
cannot open source file "QMediaPlayer"
I tried:#include <QSound> #include <QtMultimedia/QSound>It also prompts that it can be installed using vcpkg command:
vcpkg install qt5-multimedia:x64-windows
i tried it, but it fails to compile:CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:175 (message): Failed to download file. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to "https://user:password@your-proxy-ip-address:port/". Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues Call Stack (most recent call first): scripts/cmake/vcpkg_acquire_msys.cmake:78 (vcpkg_download_distfile) ports/icu/portfile.cmake:77 (vcpkg_acquire_msys) scripts/ports.cmake:90 (include)I have the folder
QtMultimediaunder theincludefolder.
I also tried manually adding the paths to the project as seen in this answer: Stack
VS 2022, Qt 6.3.1
In docs it says I need to add
qmake: QT += multimediabut i have no.profile, where should i add it on Visual Studio?