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";
QString fullFilePath = "file://C:/PRProjector-Project/data/images/allthingsnew-background.jpg";
QMetaObject::invokeMethod(rootObject, "loadBackgroundImage", Q_RETURN_ARG(QVariant, returnedValue), Q_ARG(QVariant, fullFilePath));
To copy to clipboard, switch view to plain text mode
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; }
}
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; }
}
To copy to clipboard, switch view to plain text mode
ERROR:
qrc:/resources/qml/ProjectorScreen.qml:36:5: QML Image: Cannot open:
qrc:/resources/qml/ProjectorScreen.qml:36:5: QML Image: Cannot open:
To copy to clipboard, switch view to plain text mode
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!
Bookmarks