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. Play two mediaPlayer side by side using Qt

Play two mediaPlayer side by side using Qt

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 1 Posters 1.1k 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.
  • H Offline
    H Offline
    houmingc
    wrote on last edited by
    #1

    I created a Quick Application and want to play two mediaPlayer side by side using Qt? any advice?
    I am able to compile the code below, but it cannot run.

    Window{
    visible: true
    width: 360
    height: 360

             MouseArea{
             anchors.fill:  parent
             onClicked: Qt.quit();
             }
             MediaPlayer{
              id:player2
              source:"/home/common/abc.mp4"
    

    }

    }

    1 Reply Last reply
    0
    • H Offline
      H Offline
      houmingc
      wrote on last edited by
      #2

      vivelu, how to make the video flickable
      I am able to make a square flicker inserting the element below

      Rectangle {
      width:100;height:100
      color:"red"
      sequentialAnimation on x{
      loops:Animation.Infinite
      PropertyAnimation{ to:50}
      PropertyAnimation{ to:0}
      }
      }

      My code below to make mp4 flick is not working.

      Flickable {
      width:200; height:200
      contentWidth:image.width; contentHeight:image.height

        Image { id:image; source:"file:///home/common/xx.mp4"}
      

      }

      1 Reply Last reply
      0
      • H Offline
        H Offline
        houmingc
        wrote on last edited by
        #3

        i need to start and stop the video using a timer from c++

        I could create & destroy an qml object from C++
        QQuickView view;
        view.setSource(QUrl:fromLocalFile("MyItem.qml));
        view.show();
        QObject *object=view.rootObject();

        but i would like to change a change a property in Qtmultimedia to stop the player using
        item{
        property int someNumber:100

        QQmlProperty::write(object, "someNumber",5000);
        }

        Any advice?

        1 Reply Last reply
        0

        • Login

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