diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-06 20:21:19 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-06 20:21:19 +0100 |
commit | 82621148de82d63a562163a72598e15ed98797a8 (patch) | |
tree | 030d345ad4a4ae612995949bbbeec66b36e69854 /examples/multimediawidgets/customvideosurface/customvideowidget | |
parent | 2fc515ea1eaa0f7ffb56c4dadee560095c3374bd (diff) | |
parent | 7a3b8907060123fe5d487d4c9ba3a1e222f468bb (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
.qmake.conf
Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
Diffstat (limited to 'examples/multimediawidgets/customvideosurface/customvideowidget')
-rw-r--r-- | examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.cpp b/examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.cpp index 7d0759c35..7730f8140 100644 --- a/examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.cpp +++ b/examples/multimediawidgets/customvideosurface/customvideowidget/videoplayer.cpp @@ -64,20 +64,21 @@ VideoPlayer::VideoPlayer(QWidget *parent) VideoWidget *videoWidget = new VideoWidget; QAbstractButton *openButton = new QPushButton(tr("Open...")); - connect(openButton, SIGNAL(clicked()), this, SLOT(openFile())); + connect(openButton, &QAbstractButton::clicked, + this, &VideoPlayer::openFile); playButton = new QPushButton; playButton->setEnabled(false); playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); - connect(playButton, SIGNAL(clicked()), - this, SLOT(play())); + connect(playButton, &QAbstractButton::clicked, + this, &VideoPlayer::play); positionSlider = new QSlider(Qt::Horizontal); positionSlider->setRange(0, 0); - connect(positionSlider, SIGNAL(sliderMoved(int)), - this, SLOT(setPosition(int))); + connect(positionSlider, &QSlider::sliderMoved, + this, &VideoPlayer::setPosition); QBoxLayout *controlLayout = new QHBoxLayout; controlLayout->setMargin(0); @@ -92,10 +93,10 @@ VideoPlayer::VideoPlayer(QWidget *parent) setLayout(layout); mediaPlayer.setVideoOutput(videoWidget->videoSurface()); - connect(&mediaPlayer, SIGNAL(stateChanged(QMediaPlayer::State)), - this, SLOT(mediaStateChanged(QMediaPlayer::State))); - connect(&mediaPlayer, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64))); - connect(&mediaPlayer, SIGNAL(durationChanged(qint64)), this, SLOT(durationChanged(qint64))); + connect(&mediaPlayer, &QMediaPlayer::stateChanged, + this, &VideoPlayer::mediaStateChanged); + connect(&mediaPlayer, &QMediaPlayer::positionChanged, this, &VideoPlayer::positionChanged); + connect(&mediaPlayer, &QMediaPlayer::durationChanged, this, &VideoPlayer::durationChanged); } VideoPlayer::~VideoPlayer() |