i am trying to play a video with QMediaPlayer. At the moment i'm using the example from the QT Homepage:
http://qt-project.org/doc/qt-5.0/qtmultimedia/videooverview.html
player = new QMediaPlayer(this);
QGraphicsVideoItem *item = new QGraphicsVideoItem;
player->setVideoOutput(item);
graphicsView->scene()->addItem(item);
graphicsView->show();
player->setMedia(QUrl("http://example.com/myclip4.ogv"));
player->play();
When i try to compile this code, i get this error:
C:\Users\Philipp\Desktop\CarPC_Terminal\mainwindow.cpp:220: Fehler:undefined reference to `_imp___ZN18QGraphicsVideoItemC1EP13QGraphicsItem'
Can somebody tell me what i have to do to solve this problem?
My includes:
#include <QMainWindow>
#include <QtMultimedia>
#include <QtMultimediaWidgets/QVideoWidget>
#include <QtMultimediaWidgets/QGraphicsVideoItem>
#include <QtWidgets/QGraphicsItem>
#include <QGraphicsView>
Thats the output of my debugger:
Debuggen beginnt
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\platforms\qminimald.dll"
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\platforms\qoffscreend.dll"
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\platforms\qwindowsd.dll"
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\mediaservice\dsengined.dll"
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\mediaservice\qtmedia_audioengined.dll"
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\accessible\qtaccessiblequickd.dll"
Temporarily disabling breakpoints for unloaded shared library "C:\Qt\Qt5.1.0\5.1.0\mingw48_32\plugins\accessible\qtaccessiblewidgetsd.dll"
(Internal error: pc 0x4 in read in psymtab, but not in symtab.)
(Internal error: pc 0x4 in read in psymtab, but not in symtab.)