heavyLime
heavyLime

Reputation: 11

Qt creator 4 cannot find QCamera

I want to use QCamera, but Qt Creator 4.0.1 with Qt 5.6.1 says that such files do not exist, when I'm trying to include it:

#include <QtMultimedia/QCamera>

I've tried it also without the QtMultimedia/ beforehand. And also autocomplition menu. My System is Debian Testing. This is a C++11 project. My Project.pro file looks like this:

    QT       += core gui opengl multimedia

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = Classifier
    TEMPLATE = app

    QMAKE_CXXFLAGS += -std=c++11
    [..]

I have deleted QT += multimediawidgets, because QT warns, that it is unknown. Although libqt5multimediawidgets5 is installed. Or do I need more packages for that? I have tried the following:

As mentioned, I have also Qt4 stuff installed. I have also an old project, which was set up in Windows and uses QCamera. There Qt Creator cannot find it either. If this does not work anyway on Debian for some reason, what is an alternative -compatible with Qt?

Upvotes: 0

Views: 2126

Answers (1)

heavyLime
heavyLime

Reputation: 11

Ubuntu 14.04 with qt5-base, qtcreator and qtmultimedia5-dev recognizes it. And there was an error in the ui mainwindow.h which occurs, if you use a qt4 project with qt5. So it used qt4 on Debian, even though qt5 is installed. But I have no idea how I can enforce qt5 in Qt Creator. So it seems to be a Qt Creator problem. This is actually no direct solution, but it works now (for me). But if anyone knows how to enforce qt5, I would appriciate it. Because Ubuntu is only a workaround

Upvotes: 1

Related Questions