This commit is contained in:
LubuWest 2020-01-27 21:53:51 +01:00
commit c1bdcbf963
48 changed files with 1333 additions and 1229 deletions

View file

@ -37,8 +37,8 @@ import QtQuick 2.9
Rectangle{
color:"black"
//border.color: "light grey"
width:newscolumn.width/2;
height:newscolumn.width/3//video.hasVideo?newscolumn.width/4*3:10*mm
width:toprow.width/2;
height:toprow.width/3//video.hasVideo?newscolumn.width/4*3:10*mm
property var attachment:({})
Text{
id:noticeText
@ -54,11 +54,13 @@ Rectangle{
MouseArea {anchors.fill:parent;
onClicked:{
if(attachment.mimetype=="video/youtube"){
var component = Qt.createComponent("qrc:/qml/newsqml/NewsYplayer.qml");
var videoQml = component.createObject(root,{"ytcode":attachment.url,"mimetype":attachment.mimetype});
root.push("qrc:/qml/newsqml/NewsYplayer.qml",{"ytcode":attachment.url,"mimetype":attachment.mimetype});
// var component = Qt.createComponent("qrc:/qml/newsqml/NewsYplayer.qml");
// var videoQml = component.createObject(root,{"ytcode":attachment.url,"mimetype":attachment.mimetype});
} else {
var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideoLarge.qml");
var videoQml = component.createObject(root,{"source": attachment.url,"mimetype": attachment.mimetype});
root.push("qrc:/qml/newsqml/NewsVideoLarge.qml",{"source": attachment.url,"mimetype": attachment.mimetype});
// var component = Qt.createComponent("qrc:/qml/newsqml/NewsVideoLarge.qml");
// var videoQml = component.createObject(root,{"source": attachment.url,"mimetype": attachment.mimetype});
}
}
}