Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Bug on load image or video to QML using C++
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 757 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prsolucoes
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved