Skip to content
Extraits de code Groupes Projets
Vérifiée Valider ba0574b4 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

MPV: The user is no longer able to click on the slider without dragging it...

MPV: The user is no longer able to click on the slider without dragging it producing a not correct position in the video if MPV is not playing
parent 0f07a913
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Video playback with mpv
...@@ -36,6 +36,27 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep ...@@ -36,6 +36,27 @@ MpvControls::MpvControls(MpvContainer *passedContainer, QWidget *parent) noexcep
askedSliderPosition = value; askedSliderPosition = value;
}); });
connect(progressBar, &QAbstractSlider::actionTriggered, this,
[progressBar](int action) noexcept -> void {
switch (static_cast<QAbstractSlider::SliderAction>(action)) {
case QAbstractSlider::SliderAction::SliderMove:
qDebug() << "moved";
break;
case QAbstractSlider::SliderSingleStepAdd:
case QAbstractSlider::SliderSingleStepSub:
case QAbstractSlider::SliderPageStepAdd:
case QAbstractSlider::SliderPageStepSub:
progressBar->setSliderPosition(progressBar->value());
break;
case QAbstractSlider::SliderNoAction:
case QAbstractSlider::SliderToMinimum:
case QAbstractSlider::SliderToMaximum:
break;
}
});
connect(progressBar, &QAbstractSlider::sliderReleased, this, [this]() noexcept -> void { connect(progressBar, &QAbstractSlider::sliderReleased, this, [this]() noexcept -> void {
qDebug() << "Slider set to" << askedSliderPosition << "max was" << timeDuration.count(); qDebug() << "Slider set to" << askedSliderPosition << "max was" << timeDuration.count();
timePosition = chrono::seconds(askedSliderPosition); timePosition = chrono::seconds(askedSliderPosition);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter