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 last edited by
    #1

    Hi Everyone ,

    Can anyone help to play video using QML in ubuntu

    Manohar_SLM 1 Reply Last reply
    0
    • S Sushma_MP

      Hi Everyone ,

      Can anyone help to play video using QML in ubuntu

      Manohar_SLM Offline
      Manohar_SLM Offline
      Manohar_SL
      wrote on 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

      • Login

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