title: Qt slot and signal: no matching function in MainWindow
body: <p>I have looked at a variety of the Qt discussions for this error "no matching function for call to" and I still cannot see what is different in this case. I have successfully set up slot/signal pairs between GUI elements, but for some reason the latest set of slot/signal pairs is creating an error.</p>
  
  <p>In order to allow all GUI elements to update the status bar on the main window I have created a signal in each panel as shown here</p>
  
  <pre><code>class PanelA : public QWidget
  {
    ...
    public signals:
       void UpdateStatusBar(std::string);
    ...
  }
  </code></pre>
  
  <p>Then in MainWindow there is a slot</p>
  
  <pre><code>//from MainWindow.h
  class MainWindow : public QMainWindow
  {
    private slots:
       void ReceiveStatus(std::string);
  }
  
  //from MainWindow.cpp
  void MainWindow::ReceiveStatus(std::string s)
  {
    //I can provide other controls, filters, etc.
    //but currently there are none
    ui-&gt;statusBar-&gt;showMessage(tr("System status: "+s));
  }
  </code></pre>
  
  <p>And finally, in the MainWindow constructor I have several signals already and I have added one new connect line for each GUI element.</p>
  
  <pre><code>connect(ui-&gt;panelA, &amp;PanelA::SelectionChanged, ui-&gt;panelB, &amp;PanelB::UpdateSelection);
  //this one works
  connect(ui-&gt;panelA, &amp;PanelA::UpdateStatusBar, ui, &amp;MainWindow::ReceiveStatus);
  //this one generates an error there is one status bar connection for each
  </code></pre>
  
  <p>So, as far as I can tell the syntax is right. both ui->panelA and ui are pointers. I don't know why one is correct and the other is wrong. I'd appreciate any suggestions.</p>