title: Qt5 | Function w/ Slot Not Working
body: <p>I've made an app with two forms.</p>
  
  <p>When I press the save button in the second form, it updates the DB Record, and returns back to the first form. I've connected the two forms via Signal-Slot with this code:</p>
  
  <p>DruckerData.h</p>
  
  <pre><code>signals:
  void btnSavePressed(QString printerName);
  </code></pre>
  
  <p>DruckerData.cpp</p>
  
  <pre><code>UiMainWindow frmMain;
  connect(this,SIGNAL(btnSavePressed(QString)),&amp;frmMain,SLOT(refreshSaved( QString )));
  emit btnSavePressed(ui-&gt;ledit_druckerName-&gt;text());
  this-&gt;hide();
  </code></pre>
  
  <p>UiMainWindow.h</p>
  
  <pre><code>public slots:
  void refreshSaved(QString printerName);
  </code></pre>
  
  <p>UiMainWindow.cpp</p>
  
  <pre><code>void UiMainWindow::refreshSaved(QString printerName){
      qDebug()&lt;&lt;"Updated: "&lt;&lt;printerName;
  
      show_list(); //&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; this function
  }
  </code></pre>
  
  <p>show_list</p>
  
  <pre><code>void UiMainWindow::show_list (){
  
      QList&lt;DB_Printers_lvs&gt; list;
      DB_Printers_lvsTransporter t("LVS");
      QString        wc;
  
      this-&gt;setCursor(Qt::WaitCursor);
  
      wc = QString("where 1=1 order by nam_printer");
      if (!t.load_dbPrinters_lvs_wc(&amp;list,wc))
      {
          log()&lt;&lt; "get printers failed"&lt;&lt; wc &lt;&lt; t.getLastError();
          this-&gt;setCursor(Qt::ArrowCursor);
          return;
      }
  
  
      ui.treeWidget-&gt;clear();
  
      foreach (DB_Printers_lvs db, list)
      {
          QTreeWidgetItem *item = new QTreeWidgetItem(0);
  
          printer_to_qtreewidgetitem(item, db);
  
          ui.treeWidget-&gt;insertTopLevelItem(ui.treeWidget-&gt;topLevelItemCount(), item);
      }
  
      ui.treeWidget-&gt;header()-&gt;resizeSections(QHeaderView::ResizeToContents);
      ui.bow_search-&gt;apply();
      this-&gt;setCursor(Qt::ArrowCursor);
  }
  </code></pre>
  
  <p>When I press the button on the second form and the first form shows I see debug writing <code>Updated</code> with printer name but the problem is how can I call or start this funktion <code>show_list()</code>?</p>
  
  <p>Thanks for help.</p>