satg
satg

Reputation: 81

Why am I missing the Qt Multimedia functionality?

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.

Upvotes: 8

Views: 15240

Answers (4)

Ilkka
Ilkka

Reputation: 2694

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.

Upvotes: 7

Josh Marshall
Josh Marshall

Reputation: 159

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

Upvotes: 0

user3436744
user3436744

Reputation: 31

try sudo apt-get install qtmultimedia5-dev

Upvotes: 2

ros
ros

Reputation: 81

Try including it like this:

#include <QtMultimedia/QAudioOutput>

Upvotes: 8

Related Questions