QtMultimedia on Raspbian
-
I tried to deploy an application Qt on Raspbian (in raspberry pi 3).
Qt Creator 3.2.1
Based on Qt 5.3.2 (GCC 4.9.2, 32 bit)Debuggers: System GDB at /usr/bin/gdb/bin/gdb GDB
Compiler: /usr/bin/arm-linux-gnueabihf-gcc-4.9
Qt Version: Qt 5.3.2 (qt5) /usr/lib/arm-linux-gnueabihf/qt5/bin/qmakeI have a problem when I want execute my application :
Error: Could not load: qrc:/main.qml:7 module "QtMultimedia" is not installed
I tried to deploy an application Qt on Raspbian (in raspberry pi 3).
Qt Creator 3.2.1
Based on Qt 5.3.2 (GCC 4.9.2, 32 bit)
Debuggers: System GDB at /usr/bin/gdb/bin/gdb GDB
Compiler: /usr/bin/arm-linux-gnueabihf-gcc-4.9
Qt Version: Qt 5.3.2 (qt5) /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake
I have a problem when I want execute my application :Error: Could not load: qrc:/main.qml:7 module "QtMultimedia" is not installed
Line 7:import QtMultimedia 5.0
I use camera in qml.
Camera { id: camera imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
My app.pro:
Qt += multimedia
I install:
qtdeclarative5-dev, qtmobility-dev, qtdeclarative5-qtmultimedia-plugin
and
sudo apt-get install libfontconfig1-dev libdbus-1-dev libfreetype6-dev libudev-dev libicu-dev libsqlite3-dev libxslt1-dev libssl-dev libasound2-dev libavcodec-dev libavformat-dev \ libswscale-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev gstreamer-tools gstreamer0.10-plugins-good gstreamer0.10-plugins-bad libraspberrypi-dev libpulse-dev \ libx11-dev libglib2.0-dev libcups2-dev freetds-dev libsqlite0-dev libpq-dev libiodbc2-dev libmysqlclient-dev firebird-dev libpng12-dev libjpeg9-dev libgst-dev libxext-dev libxcb1 \ libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev \ libxcb-sync0 libxcb-sync1-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxi-dev libdrm-dev gstreamer0.10-alsa
But I have same error.
-
Hi,
From what I can see, you are cross-compiling with Qt 5.3.2 but you are basing your code based on the 5.8 version, while likely using yet another version on your Raspian.
Makes a bit of mix to find what's the exact problem.
-
Hi, Thanks
I wrote this application with Qt 5.8 for windows. It works fine in windows.
I want to build same application in "Raspbian" (Raspberry pi3).
What did I do wrong? (In install the Qt on Raspbian or?)
What should I install Qt version? -
Do you mean you want to cross-compile it or build it directly on your Pi3 ?
-
Then you should check which is the exact version of Qt that is installed and then adapt the code to that version. If you want to use the exact same version, then you can compile Qt directly on your RPi3.