How to use 2 classes in Qt
-
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 -
what is the context you are trying to use ? How are you trying to use them ? Who is instantiating them ?
- You can define some methods and directly call them methods between them or
- you can use signal and slot.
-
Take a look on "Media Player Example":http://qt-project.org/doc/qt-5/qtmultimediawidgets-player-example.html
-
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.
-
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.
-
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.