Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to play Video in Ubuntu using QML
Forum Updated to NodeBB v4.3 + New Features

How to play Video in Ubuntu using QML

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 450 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.
  • S Offline
    S Offline
    Sushma_MP
    wrote on 14 Apr 2017, 04:54 last edited by
    #1

    Hi Everyone ,

    Can anyone help to play video using QML in ubuntu

    M 1 Reply Last reply 14 Apr 2017, 06:54
    0
    • S Sushma_MP
      14 Apr 2017, 04:54

      Hi Everyone ,

      Can anyone help to play video using QML in ubuntu

      M Offline
      M Offline
      Manohar_SL
      wrote on 14 Apr 2017, 06:54 last edited by
      #2

      Hi @Sushma_MP

      Following piece of code should help you to play video if your Ubuntu machine is setup with GStreamer.

      import QtMultimedia 5.0

      Window {
      title: qsTr("Hello World")
      width: 640
      height: 480
      visible: true
      Video
      {
      id: video
      anchors.fill: parent
      source: "file:///home/manu/Desktop/Projects/song.mp4"

          MouseArea {
              anchors.fill: parent
              onClicked: {
                  video.play()
              }
          }
      }
      

      }

      Manohar SL
      Embedded Qt & QML Developer

      1 Reply Last reply
      2

      1/2

      14 Apr 2017, 04:54

      • Login

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