Why am I missing the Qt Multimedia functionality?

只愿长相守 提交于 2019-12-14 00:30:41

问题


I am new to Qt and I'm creating a simple application which will playback an audio file. I realized that I am lacking the Qt Multimedia API for audio when I wrote:

#include <QAudioOutput>

..and I get that there is no such file.

I downloaded the latest Qt SDK framework and I can't find a way to add these APIs. I am using Qt creator IDE.

IS there a way to get the multimedia functionality working maybe as an add-on or some other way?

Thanks.


回答1:


Try including it like this:

#include <QtMultimedia/QAudioOutput>




回答2:


Without more info it's hard to say, but possibly your include paths are just incomplete. Read https://doc.qt.io/archives/qt-4.7/qtmultimedia.html and be sure to add

QT += multimedia

to your project file.




回答3:


try sudo apt-get install qtmultimedia5-dev




回答4:


in your pro. file try: QT += widgets multimedia



来源:https://stackoverflow.com/questions/5410170/why-am-i-missing-the-qt-multimedia-functionality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!