diff options
Diffstat (limited to 'examples/charts/piechartcustomization/pentool.cpp')
-rw-r--r-- | examples/charts/piechartcustomization/pentool.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/examples/charts/piechartcustomization/pentool.cpp b/examples/charts/piechartcustomization/pentool.cpp index f39d8661..3b160859 100644 --- a/examples/charts/piechartcustomization/pentool.cpp +++ b/examples/charts/piechartcustomization/pentool.cpp @@ -71,11 +71,20 @@ PenTool::PenTool(QString title, QWidget *parent) layout->addRow("Join style", m_joinStyleCombo); setLayout(layout); - connect(m_colorButton, SIGNAL(clicked()), this, SLOT(showColorDialog())); - connect(m_widthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateWidth(double))); - connect(m_styleCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateStyle(int))); - connect(m_capStyleCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateCapStyle(int))); - connect(m_joinStyleCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateJoinStyle(int))); + // Use old style connect on some signals because the signal is overloaded + connect(m_colorButton, &QPushButton::clicked, this, &PenTool::showColorDialog); + connect(m_widthSpinBox, + static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged), + this, &PenTool::updateWidth); + connect(m_styleCombo, + static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &PenTool::updateStyle); + connect(m_capStyleCombo, + static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &PenTool::updateCapStyle); + connect(m_joinStyleCombo, + static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), + this, &PenTool::updateJoinStyle); } void PenTool::setPen(const QPen &pen) |