Skip to content

This is QSlider which supports the smoothly draggable handle, direct handle placement to click position for media(audio, video).

License

Notifications You must be signed in to change notification settings

yjg30737/pyqt-media-slider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyqt-media-slider

This is QSlider which supports the smoothly draggable handle, direct handle placement to click position for media(audio, video).

Requirements

PyQt5 >= 5.8

Setup

python -m pip install pyqt-media-slider

Included Packages

Signal

  • pressed(int) Signal emit when presses the handle
  • dragged(int) Signal emit when drags the handle
  • released(int) Signal emit when releases the handle

Example

from PyQt5.QtWidgets import QWidget, QHBoxLayout, QApplication

from pyqt_media_slider.mediaSlider import MediaSlider


class MediaSliderExample(QWidget):

    def __init__(self):
        super().__init__()
        self.__initUi()

    def __initUi(self):
        self.__slider = MediaSlider()
        lay = QHBoxLayout()
        lay.addWidget(self.__slider)
        self.setLayout(lay)


if __name__ == "__main__":
    import sys

    app = QApplication(sys.argv)
    player = MediaSliderExample()
    player.show()
    app.exec_()

Result

example.mp4