本文介绍了在Linux上使用QtMultimedia部署Qt应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在使用QtMultimedia的Linux(Ubuntu 14.04)上部署应用程序Qt(5.3)我首先部署了一个简单的应用程序(Hello World)来理解.我没有问题,无需安装Qt即可在PC上运行该应用程序.同样,我尝试部署整个应用程序,但是在执行应用程序时遇到问题:

I tried to deploy an application Qt (5.3) on Linux (Ubuntu 14.04) which use QtMultimediaI 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

我知道问题出在QtMultimedia上,但是我找不到我忘记了哪个库.我有用于项目部署的树:

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
    - ...

当然,我的应用程序可以在计算机(ubuntu 13.10)上正常运行.我的app.pro:

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

谢谢您的帮助

推荐答案

安装 qtdeclarative5-qtmultimedia-plugin 软件包,您应该会很好

Install the qtdeclarative5-qtmultimedia-plugin package and you should be good to go

sudo apt-get install qtdeclarative5-qtmultimedia-plugin

在这里也发现了相同的问题: https://github.com/robotology/yarp/issues/263

Found the same issue here as well:https://github.com/robotology/yarp/issues/263

这篇关于在Linux上使用QtMultimedia部署Qt应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-27 08:35