Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to use 2 classes in Qt
Forum Updated to NodeBB v4.3 + New Features

How to use 2 classes in Qt

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 1.3k 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
    herculis
    wrote on last edited by
    #1

    Hellow guys
    I build a video player by Qmediaplayer class and now i want to use qmediaplyercontrol class con trol the qmediaplayer class
    How can i do it help plz

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      what is the context you are trying to use ? How are you trying to use them ? Who is instantiating them ?

      1. You can define some methods and directly call them methods between them or
      2. you can use signal and slot.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andreyc
        wrote on last edited by
        #3

        Take a look on "Media Player Example":http://qt-project.org/doc/qt-5/qtmultimediawidgets-player-example.html

        1 Reply Last reply
        0
        • H Offline
          H Offline
          herculis
          wrote on last edited by
          #4

          I want to use setposition() of qmediaplayercontrol class to set the position of a video at certain position so that when i hit the play button it shuld seek till the give time in setposition() and then start playing.

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            Hope you are able to do this. It can be one simple variable creation inside your media player class. It is set whenever you want. When hit the play button, inside the slot you can seek to value simple variable and start playing. In summary this is more of programming logic you need to implement.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            0
            • H Offline
              H Offline
              herculis
              wrote on last edited by
              #6

              ya but setpostion() is not working as the following link says
              "":http://qt-project.org/forums/viewthread/7198/
              and the solution for that i cant understand can you help me to understand it.

              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