Qt World Summit: Submit your Presentation

Deploying QML With import QtMultiMediaKit = blank white screen

  • I am trying to deploy a QML + C++ application I am working on in Windows. When I run the application in QtCreator, it works great. However when I copy the executable to a different location and run it, only a white screen pops up. I'm not sure how to get any error messages, so I've been left to trial and.. lots of error.

    Through process of elimination I have determined that the issue only occurs when I try to import QtMultimediaKit 1.1. I have tried copying the plugin to every location I can think relative to the executable and my QML files, but haven't had any luck. How can I get this working so I can include video playback in my application?

    My pro file has the following relevant lines:
    @CONFIG += qt
    QT += declarative
    win32 {
    QT_MOBILITY_PATH = /Programs/Qt/Mobility
    macx {
    QT_MOBILITY_PATH = /Developer/Qt/Mobility
    CONFIG += mobility
    MOBILITY = multimedia

    INCLUDEPATH += $$QT_MOBILITY_PATH/include/QtMobility

    QML_IMPORT_PATH = $$QT_MOBILITY_PATH/include/QtMobility

  • Apparently no one knows where Qt looks for QML plugins. If it makes any difference, I'm using QDeclarativeView to create the window for the QML.

    Does anyone know a way I can get debug messaging to the console and how to use this to output the import errors? I'm hoping to find out exactly where Qt is looking for QML's QtMultimediaKit. Alternatively, is there a way that I can render the standard Mobility Multimedia Video player into the viewport? I've been able to successfully deploy this type of video player before, but I don't know how to combine it with QML.

  • I found a little more info that seemed promising, but it appears I am not much closer to a solution. Perhaps someone else can give insight on my findings:

    1. Adding Config += console to my .pro file forces qt to open a command prompt whenever running. In this command prompt (running a deployed release executable) I get the error:
      file:///E:/Prog/assets/main.qml:2:1: plugin cannot be loaded for module "QtMultimediaKit": Cannot load library E:/Prog/QtMultimediaKit/declarative_multimedia.dll: The specified module could not be found.
      The kicker on this error: The dll mentioned as missing in that error is indeed at that path. In fact, I copied the entire QtMultimediaKit folder from my imports directory to that location so I also have the debug version of that dll (declarative_multimediad.dll) and the qmldir file at that location. Is there a way I can verify I have the correct version of these dlls?

    2. I used the following code:
      @ QDeclarativeView view;
      QStringList myList = view.engine()->importPathList(); // Important part is here
      for (int i=0; i<myList.count(); ++i)
      Coupled with Config += console to get a list of where QML is looking for imports. I got the directory the exe was located in (which is great and reinforces 1), and I got the path to my QML imports directory:

    The bottom line: Why is QML not finding the QtMultimediaKit dll even though it is clearly in the folder that is being searched?

  • I have the same issue. No one has solved it yet?

  • Well, old wisdom still works: "Just post to forum and you will find answer yourself"
    The problem we all encountered is not with the unavailability of declarative_multimedia.dll but with absence of QtMultimediaKit(d)1.dll near the exe file. Qt produce rather obscure message about its inability to find specific dll where the actual one is: it can't load declarative_multimedia.dll due to its dependencies which weren't solved.

Log in to reply