首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu filedialog

Ubuntu filedialog
EN

Ask Ubuntu用户
提问于 2015-02-03 21:54:44
回答 1查看 208关注 0票数 0

我试图制作一个视频播放应用程序,这是我到目前为止得到的代码:

代码语言:javascript
复制
import QtQuick 2.0
import QtMultimedia 5.0
import Ubuntu.Components 1.1
import QtQuick.Dialogs 1.0
Video {
    FileDialog {
        id: fileDialog
        title: "Please choose a file(.mp4)"



        Component.onCompleted: visible = true
    }
    id: video
    width : units.gu(120)
    height : units.gu(90)
    source : fileDialog.fileUrl
    MouseArea {
        Text
        {
            text : "click to play,space for stop,left and right to seek position in video"
        }
        anchors.fill: parent
        onClicked: {
            video.play()
        }
    }
    focus: true
    Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
    Keys.onLeftPressed: video.seek(video.position - 5000)
    Keys.onRightPressed: video.seek(video.position + 5000)
}

这些代码在我的IDE上运行得非常好,但是当我在我的Ubuntu15.04上安装它时,在我的笔记本电脑上安装了统一8,应用程序就崩溃了。我猜想QtQuick.Dialogs 1.0可能不是平台的一部分?那么我如何将它打包到.click?Or中呢?是否有一个替代方案是平台的一部分?

EN

回答 1

Ask Ubuntu用户

发布于 2015-08-28 16:24:20

事实是,API不提供对此的支持。因为API实现了沙箱,所以内容集线器。我的申请将不得不走入沙箱。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/581393

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档