Hi!

I have:
Qt Code:
  1. class MyWidget : public QWidget
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. MyWidget();
  7. ~MyWidget();
  8. public slots:
  9. void adequate_function(int slider_id, int value);
  10. private:
  11. QVector<QSlider*> m_sliders;
  12. }
To copy to clipboard, switch view to plain text mode 
and my constructor looks like
Qt Code:
  1. MyWidget::MyWidget()
  2. {
  3. for (int i=0 ; i<5 ; i++)
  4. {
  5. m_sliders.append(QSlider(Qt::Horizontal, this));
  6. m_sliders[i].setRange(0,100);
  7. m_sliders[i].setPageStep(20);
  8.  
  9. //this does not work but explains what I like
  10. QObject::connect( m_sliders[i], SIGNAL(valueChanged(int)),
  11. this, SLOT(setDeformationFactor( i , int) ) );
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 
so, I would like to call a function and give the slider id as argument.

Regards,Olli