title: QT "No such slot" Error
body: <p>This is the part of my Class definition/.hpp file:</p>
  
  <pre><code>class RenderGraphFrame : public QGLWidget
  {
  public:
      RenderGraphFrame(QWidget *parent);
  
  private slots:
      void PrevButton();
      void NextButton();
  
  private:
      void draw();
      QWidget *p_parent;
      bool ButtonsInited;
      QPushButton *nextButton;
      QPushButton *prevButton;
  }
  </code></pre>
  
  <p>And this are the related source parts:</p>
  
  <pre><code>RenderGraphFrame::RenderGraphFrame(QWidget *parent)
      : QGLWidget(QGLFormat(/*QGL::SampleBuffers*/), parent)
  {
      p_parent = parent;
      /* ... */
  }
  
  
  void RenderGraphFrame::draw()
  {
      if (ButtonsInited == false)
      {
          bool tmpttest_success;
          nextButton = parent-&gt;findChild&lt;QPushButton *&gt;("nextButton", Qt::FindChildrenRecursively);
          prevButton = p_parent-&gt;findChild&lt;QPushButton *&gt;("prevButton", Qt::FindChildrenRecursively);
          tmpttest_success = connect(_nextButton, SIGNAL (released()), this, SLOT(NextButton()));
  
          if (tmptest_success == false)
          {
              //this is what happens but I don't want it to happen...
          }
      }
      /*....*/
  }
  
  
  void RenderGraphFrame::NextButton()
  {
      /*somestuff*/
      return;
  }
  
  void RenderGraphFrame::PrevButton()
  {
      /*somestuff*/
      return;
  }
  </code></pre>
  
  <p>and I get the error:</p>
  
  <pre><code>QObject::connect: No such slot QGLWidget::NextButton() in ..\Graph\some\path\to.cpp:160
  QObject::connect:  (sender name:   'nextButton')
  </code></pre>
  
  <p>Ofcouse there isn't, because I don't want to connect <code>QGLWidget::NextButton()</code>, as I want to connect <code>RenderGraphFrame::NextButton()</code>.
  How I can solve this? I allready locked up all these posts about "no such slot" qt errors. but they seemed to be at all caused by other problems than mine.</p>
  
  <p>So any suggestions how to fix this?</p>