summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/easing/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/animation/easing/window.cpp')
-rw-r--r--examples/widgets/animation/easing/window.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp
index d1d6348361..378af07535 100644
--- a/examples/widgets/animation/easing/window.cpp
+++ b/examples/widgets/animation/easing/window.cpp
@@ -67,7 +67,7 @@ Window::Window(QWidget *parent)
connect(m_ui.easingCurvePicker, &QListWidget::currentRowChanged,
this, &Window::curveChanged);
- connect(m_ui.buttonGroup, QOverload<int>::of(&QButtonGroup::buttonClicked),
+ connect(m_ui.buttonGroup, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
this, &Window::pathChanged);
connect(m_ui.periodSpinBox, QOverload<double>::of(&QDoubleSpinBox::valueChanged),
this, &Window::periodChanged);
@@ -180,9 +180,10 @@ void Window::curveChanged(int row)
m_ui.overshootSpinBox->setEnabled(curveType >= QEasingCurve::InBack && curveType <= QEasingCurve::OutInBack);
}
-void Window::pathChanged(int index)
+void Window::pathChanged(QAbstractButton *button)
{
- m_anim->setPathType((Animation::PathType)index);
+ const int index = m_ui.buttonGroup->id(button);
+ m_anim->setPathType(Animation::PathType(index));
}
void Window::periodChanged(double value)