[SOLVED] Uppon including QCamera i have "mediacontrol.h: No such file or directory" error.
-
I am on ubuntu 13.04
with qt 5.i have run the command
@sudo apt-get install qtmobility-dev@and my mainwindow.cpp
@#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "QtMultimediaKit/QCamera"
#include "QtMultimediaKit/QCameraViewfinder"MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
camera = new QCamera;
viewfinder = new QCameraViewfinder;
camera->setViewfinder(viewfinder);
viewfinder->show();camera->start(); // to start the viewfinder
}
MainWindow::~MainWindow()
{
delete ui;
}
@What am i doing wrong?
-
Hi,
Aren't you mixing Qt 4 and Qt 5 libraries here ?
-
[quote author="alexisdm" date="1370035042"]Try the package qtmultimedia5-dev instead.[/quote]
done that,
@QtMultimedia/QCameraViewfinder: No such file or directory@
and the code i have added before is taken from here
http://qt-project.org/doc/qt-5.0/qtmultimedia/cameraoverview.html -
-
[quote author="alexisdm" date="1370040344"]The files to include to get those classes are "QtMultimediaWidgets/QCameraViewfinder" and "QtMultimedia/QCamera".
And in case you haven't done so yet, if your are using qmake, you need to add @QT += multimedia multimediawidgets@ in the .pro file.[/quote]
Thank you :)