问题
I tried to deploy an application Qt (5.3) on Linux (Ubuntu 14.04) which use QtMultimedia I have first deployed a simple application (Hello World) to understand. I have had no problem ro run the application on Pc without install Qt. In the same way, I have tried to desploy my whole app but I have a problem when I want execute my application :
QQmlApplicationEngine failed to load component
qrc:/main.qml:3 module "QtMultimedia" is not installed
I have understand the problem comes to QtMultimedia but I don't find which library I have forgotten. I have the tree for my project deployment :
- myApp/.
- libs
- libQt5Multimedia.so.5.3.1
- libQt5MultimediaQuick_p.so.5.3.1
- libQt5MultimediaWidgets.so.5.3.1
- ...
- myApp
- Makefile
- ...
Of course, my app run correctly on machine (ubuntu 13.10). My app.pro :
TEMPLATE = app
QT += qml quick multimedia
SOURCES += main.cpp \
datacube.cpp
RESOURCES += qml.qrc \
img_interface.qrc \
img_contenu.qrc \
media.qrc
# Additional import path used to resolve QML modules in Qt Creator's code model
QML_IMPORT_PATH =
# Default rules for deployment.
include(deployment.pri)
HEADERS += \
datacube.h
Thank you for your help
回答1:
Install the qtdeclarative5-qtmultimedia-plugin package and you should be good to go
sudo apt-get install qtdeclarative5-qtmultimedia-plugin
Found the same issue here as well: https://github.com/robotology/yarp/issues/263
来源:https://stackoverflow.com/questions/24868981/deploying-qt-app-with-qtmultimedia-on-linux