Commit 4108a75e authored by Victor Poughon's avatar Victor Poughon

Merge branch 'new_spinboxes' into widget_parents

parents b72ac720 e3e4b307
......@@ -90,7 +90,7 @@ void QtWidgetFloatParameter::DoCreateWidget()
// What happens when the value changed because of user interaction (keyboard or arrows pressed)
// Note: to avoid calling this when the value changes automatically (reset button, DoParameterUpdate, XML load),
// calls to QSpinBox::setValue() are wrapped with signal blockers
connect(m_QDoubleSpinBox, QOverload<double>::of(&QtWidgetDoubleSpinBox::valueChanged),
connect(m_QDoubleSpinBox, static_cast<void (QtWidgetDoubleSpinBox::*)(double)>(&QtWidgetDoubleSpinBox::valueChanged),
this, &QtWidgetFloatParameter::OnValueChanged);
// What happens when the SpinBox looses focus, or enter is pressed
......
......@@ -86,7 +86,7 @@ void QtWidgetIntParameter::DoCreateWidget()
// What happens when the value changed because of user interaction (keyboard or arrows pressed)
// Note: to avoid calling this when the value changes automatically (reset button, DoParameterUpdate, XML load),
// calls to QSpinBox::setValue() are wrapped with signal blockers
connect(m_QSpinBox, QOverload<int>::of(&QtWidgetSpinBox::valueChanged),
connect(m_QSpinBox, static_cast<void (QtWidgetSpinBox::*)(int)>(&QtWidgetSpinBox::valueChanged),
this, &QtWidgetIntParameter::OnValueChanged);
// What happens when the SpinBox looses focus, or enter is pressed
......
......@@ -69,7 +69,7 @@ QtWidgetSpinBox::QtWidgetSpinBox( QWidget* parent )
connect(m_LineEdit, &QtWidgetLineEdit::Cleared, this, &QtWidgetSpinBox::Cleared);
// Small Qt hack to prevent highlighting the text after it has changed (to improve UX a bit)
connect(this, QOverload<int>::of(&QtWidgetSpinBox::valueChanged), this, [&](int) {
connect(this, static_cast<void (QtWidgetSpinBox::*)(int)>(&QtWidgetSpinBox::valueChanged), this, [&](int) {
m_LineEdit->deselect();
}, Qt::QueuedConnection);
......@@ -128,7 +128,7 @@ QtWidgetDoubleSpinBox::QtWidgetDoubleSpinBox( QWidget* parent )
connect(m_LineEdit, &QtWidgetLineEdit::Cleared, this, &QtWidgetDoubleSpinBox::Cleared);
// Small Qt hack to prevent highlighting the text after it has changed (to improve UX a bit)
connect(this, QOverload<double>::of(&QtWidgetDoubleSpinBox::valueChanged), this, [&](double) {
connect(this, static_cast<void (QtWidgetDoubleSpinBox::*)(double)>(&QtWidgetDoubleSpinBox::valueChanged), this, [&](double) {
m_LineEdit->deselect();
}, Qt::QueuedConnection);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment