【发布时间】:2020-06-25 23:53:26
【问题描述】:
我想用播放按钮播放视频,暂停,10秒后转发视频,然后使用qml返回视频,但我不知道怎么做。
类似这样的:
import QtQuick 2.12
import QtQuick.Window 2.12
import QtMultimedia 5.12
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.12
Window {
visible: true
width: 840
height: 680
title: qsTr("Hello World")
ColumnLayout{
Video {
id: video
width : 600
height : 600
source: "a.avi"
}
RowLayout{
Button {
width: 80
height: 80
text: "play"
onClicked: {video.play()}
}
Button {
width: 80
height: 80
text: "pause"
onClicked: {video.pause()}
}
Button {
width: 80
height: 80
text: "foward"
onClicked: {video.foward()}
}
Button {
width: 80
height: 80
text: "back"
onClicked: {video.back()}
}
}
}
}
【问题讨论】:
-
对不起,我不太清楚文本的格式