SeekSlider Class


The SeekSlider class provides a slider for seeking to positions in media streams. More...

Header: #include <Phonon/SeekSlider>
Since: Qt 4.4
Inherits: QWidget


  • 58 properties inherited from QWidget
  • 1 property inherited from QObject

Public Functions

SeekSlider(QWidget * parent = 0)
SeekSlider(MediaObject * media, QWidget * parent = 0)
bool hasTracking() const
QSize iconSize() const
bool isIconVisible() const
MediaObject * mediaObject() const
Qt::Orientation orientation() const
int pageStep() const
void setPageStep(int milliseconds)
void setSingleStep(int milliseconds)
void setTracking(bool tracking)
int singleStep() const
  • 220 public functions inherited from QWidget
  • 29 public functions inherited from QObject
  • 12 public functions inherited from QPaintDevice

Public Slots

void setIconSize(const QSize & size)
void setIconVisible(bool)
void setMediaObject(MediaObject * media)
void setOrientation(Qt::Orientation)
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject

Additional Inherited Members

  • 1 signal inherited from QWidget
  • 1 signal inherited from QObject
  • 4 static public members inherited from QWidget
  • 7 static public members inherited from QObject
  • 37 protected functions inherited from QWidget
  • 8 protected functions inherited from QObject
  • 1 protected function inherited from QPaintDevice
  • 1 protected slot inherited from QWidget

Detailed Description

The SeekSlider class provides a slider for seeking to positions in media streams.

The SeekSlider connects to a MediaObject, and controls the seek position in the object's media stream.

The slider will connect to the necessary signals to keep track of the sliders maximum, minimum, and current values. It will also disable itself for non-seekable streams, and update the media object when the current value of the slider changes.

Here follows a typical example of SeekSlider usage:

    Phonon::MediaObject *moo = new Phonon::MediaObject;;
    Phonon::AudioOutput *device = new Phonon::AudioOutput;
    Phonon::createPath(moo, device);

    Phonon::SeekSlider *slider = new Phonon::SeekSlider;


See also Phonon::VolumeSlider, Phonon::VideoWidget, Music Player Example, and Phonon Module.

Property Documentation

iconSize : QSize

This property holds the icon size used for the mute button/icon.

The default size is defined by the GUI style.

Access functions:

QSize iconSize() const
void setIconSize(const QSize & size)

iconVisible : bool

This property holds whether the icon next to the slider is visible.

By default the icon is visible if the platform provides an icon; else it's hidden.

Access functions:

bool isIconVisible() const
void setIconVisible(bool)

orientation : Qt::Orientation

This property holds the orientation of the slider.

The orientation must be Qt::Vertical or Qt::Horizontal (the default).

Access functions:

Qt::Orientation orientation() const
void setOrientation(Qt::Orientation)

pageStep : int

This property holds the page step interval.

The larger of two natural steps that a slider provides and typically corresponds to the user pressing PageUp or PageDown.

Defaults to 5 seconds.

Access functions:

int pageStep() const
void setPageStep(int milliseconds)

singleStep : int

This property holds the single step interval.

The smaller of two natural steps that a slider provides and typically corresponds to the user pressing an arrow key.

Defaults to 0.5 seconds.

Access functions:

int singleStep() const
void setSingleStep(int milliseconds)

tracking : bool

This property holds whether slider tracking is enabled.

If tracking is enabled (the default), the media seeks while the slider is being dragged. If tracking is disabled, the media seeks only when the user releases the slider.

Access functions:

bool hasTracking() const
void setTracking(bool tracking)

Member Function Documentation

SeekSlider::SeekSlider(QWidget * parent = 0)

Constructs a seek slider widget with the given parent.

SeekSlider::SeekSlider(MediaObject * media, QWidget * parent = 0)

Constructs a seek slider widget for the specified media with the given parent.


Destroys the seek slider.

MediaObject * SeekSlider::mediaObject() const

Return the media object this SeekSlider controls.

See also setMediaObject().

[slot] void SeekSlider::setMediaObject(MediaObject * media)

Sets the media object to be controlled by this slider to the media specified.

See also mediaObject().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.