Hello,
I have create class of QwtPlotMagnifier,
{
Q_OBJECT
public:
ZoomMagnify
(QwtPlot *plot, Qt
::KeyboardModifier key
);
private:
virtual void rescale(double factor) override;
signals:
void autoScaleDisable(bool state);
};
class ZoomMagnify: public QwtPlotMagnifier
{
Q_OBJECT
public:
ZoomMagnify(QwtPlot *plot, Qt::KeyboardModifier key);
private:
virtual void rescale(double factor) override;
signals:
void autoScaleDisable(bool state);
};
To copy to clipboard, switch view to plain text mode
Then I have create objects using QVector,
QVector<ZoomMagnify*> magnifier;
connect(magnifier.at(0), &ZoomMagnify::autoScaleDisable, m_checkBox, &QCheckBox::setChecked);
connect(magnifier.at(1), &ZoomMagnify::autoScaleDisable, m_checkBox, &QCheckBox::setChecked);
QVector<ZoomMagnify*> magnifier;
connect(magnifier.at(0), &ZoomMagnify::autoScaleDisable, m_checkBox, &QCheckBox::setChecked);
connect(magnifier.at(1), &ZoomMagnify::autoScaleDisable, m_checkBox, &QCheckBox::setChecked);
To copy to clipboard, switch view to plain text mode
Now as we see I have to write 2 connect methods for both the objects to connect autoScaleDisable, so does it is possible I can write it in single connect method ?
Thanks
Bookmarks