Bug on load image or video to QML using C++



  • Hi,

    I made a project for a church that show images on projector.

    On my mac(osx 10.9) and ubuntu linux 13, everything is working nice, but on Windows machine the exact software dont load the images to QML and dont load vídeos to MediaPlayer.

    This problems i only get on Windows.

    The example project of loading video on QML works nice, but everything is done inside a QML application.

    My application change the image and video dynamic invoking a method. Look the code:

    FROM MY C++ APP:

    @QString fullFilePath = "file://C:/PRProjector-Project/data/images/allthingsnew-background.jpg";
    QMetaObject::invokeMethod(rootObject, "loadBackgroundImage", Q_RETURN_ARG(QVariant, returnedValue), Q_ARG(QVariant, fullFilePath));
    @

    FROM MY QML FILE:

    @import QtQuick 2.2
    import QtMultimedia 5.2
    import QtGraphicalEffects 1.0
    Item {
    function loadBackgroundImage(fullFilePath)
    { backgroundImage.source = fullFilePath; }
    Image
    { id: backgroundImage objectName: "backgroundImage" source: "" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter anchors.fill: parent; }
    }
    @

    ERROR:

    @qrc:/resources/qml/ProjectorScreen.qml:36:5: QML Image: Cannot open: @

    Also, I got error error event on MediaPlayer object from QML when i try load some video too.

    REMEMBER: IT IS WORKING IN MAC OSX AND LINUX!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.