title: multiple signals for one slot
body: <p>For my GUI i would like to have two pairs of buttons that scroll up and down a scrollarea. The first set of buttons should work on say scrollarea1 and the second set of buttons should work on a scrollarea2. The widgets that I put in the scrollarea are called viewport1 and viewport2.
  Since both both set of buttons should do the same (scrolling up and down) I thought I would make two slots called scrollUp and scrollDown that would handle the scrolling for both sets of buttons. Unfortunately I cannot make this work and need some help. I have tried the following:</p>
  
  <pre><code>QPushButton up;
  QPushButton down;
  QPushButton up2;
  QPushButton down2;
  
  connect(&amp;up,SIGNAL(clicked()),&amp;up,SLOT(scrollUp()));
  connect(&amp;up2,SIGNAL(clicked()),&amp;up,SLOT(scrollUp()));
  connect(&amp;down,SIGNAL(clicked()),&amp;down,SLOT(scrollDown()));
  connect(&amp;down2,SIGNAL(clicked()),&amp;down,SLOT(scrollDown()));
  
  void MainWindow::scrollDown()
  {
  QScrollArea area;
  QWidget view;
  
  if((QPushButton) &amp;sender = down)
  {
      area=scrollArea;
      view=viewport;
  }
  if((QPushButton) &amp;sender = down2)
  {
      area=scrollArea;
      view=viewport;
  }
  int curpos = area.verticalScrollBar()-&gt;value();
  area.verticalScrollBar()-&gt;setValue(curpos+15);
  int newpos = area.verticalScrollBar()-&gt;value();
  QPoint topLeft = area.viewport()-&gt;rect().topLeft();
  view.move(topLeft.x(),topLeft.y()-(newpos));
  }
  
  void MainWindow::scrollUp()
  {
  QScrollArea area;
  QWidget view;
  
  if((QPushButton) &amp;sender = up)
  {
      area=scrollArea;
      view=viewport;
  }
  if((QPushButton) &amp;sender = up2)
  {
      area=scrollArea2;
      view=viewport2;
  }
  int curpos = area.verticalScrollBar()-&gt;value();
  area.verticalScrollBar()-&gt;setValue(curpos-15);
  int newpos = area.verticalScrollBar()-&gt;value();
  QPoint topLeft = area.viewport()-&gt;rect().topLeft();
  view.move(topLeft.x(),topLeft.y()-(newpos));
  }
  </code></pre>
  
  <p>But this doesn´t work for several reasons. I also tried giving the slot some arguments, something like:</p>
  
  <pre><code>connect(&amp;up,SIGNAL(clicked()),&amp;up,SLOT(scrollUp(scrollarea1,viewport1)));
  connect(&amp;up2,SIGNAL(clicked()),&amp;up,SLOT(scrollUp(scrollarea2,viewport2)));
  </code></pre>
  
  <p>But again, no succes. Can anybody help me?</p>