npatil15
20th February 2019, 10:21
Hello,
I have create class of QwtPlotMagnifier,
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);
};
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);
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
I have create class of QwtPlotMagnifier,
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);
};
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);
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