title: Qt Custom Slots
body: <p>Why doesn't the slot Reset() work? I want the button "reset" to reset the value of the sider to zero.</p>
  
  <pre><code>class MySlider : public QSlider
  {
     public:
      MySlider(Qt::Orientation orientation, QWidget *parent = 0) : QSlider(orientation parent){}
  
     public slots:
     void Reset()
     {
     this-&gt;setValue(0);
     }
  };
  
  //it doesnt work when i try this
  
  MySlider * Slider = new MySlider(Qt::Horizontal, this);
  
  QPushButton *Reset = new QPushButton(tr("Reset"), this);
  
  connect(Reset, SIGNAL(clicked()), Slider, SLOT(Reset()) );
  </code></pre>