I am running on ubuntu 13.10 64bit with installed Qt Creator also i have installed libphonon-dev
my code looks like this: mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <phonon/phonon> // yes directory /usr/include/phonon exists
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
Phonon::MediaObject *music = Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource("/home/erik/Downloads/Bob_Marley-No_Woman_No_Cry.mp3"));
music->play();
}
MainWindow::~MainWindow()
{
delete ui;
}
I am getting 10 same errors:
/usr/include/phonon/phonon:12: In file included from
/usr/include/phonon/phonon:12:0,
/home/erik/QtProjs/QtPlayer/mainwindow.cpp:3: from
../QtPlayer/mainwindow.cpp:3: /usr/include/phonon/effectwidget.h:28:
error: QtGui/QWidget: No such file or directory #include
<QtGui/QWidget> ^ /usr/include/phonon/effectwidget.h
any other project file is default (mainwindow.h, mainwindow.ui, main.cpp)
Yesterday i have made a simple text editor(not from example), but i cant get through this error.
Thankyou
Take a look at this question. It can be similar to your case if you're building a Qt 4 project with Qt 5.