title: how to force Qt mainWindow to wait for some changes
body: <p>I am designing UI for my opencv application and I'm new in Qt.</p>
  
  <p>I have a <strong>QString</strong> in my Qt code that is a licence plate. and it can be change when a car arrive to our camera, but we don't know when it change.</p>
  
  <p>and when car arrive we need to show it's plate on a QTableView on MainWindow.</p>
  
  <p>how can I handle it in Qt?</p>
  
  <p>I make my code simple here:</p>
  
  <blockquote>
    <p>mainWindow.h</p>
  </blockquote>
  
  <pre><code>class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
      .
      .
      .
  
      public slots:
          void set_plate(QString p);
  
      signals:
          void plate_changed(QString newPlate);
  
      private:
          Ui::MainWindow *ui;
          QString plate;
  
  };
  </code></pre>
  
  <blockquote>
    <p>mainWindow.cpp</p>
  </blockquote>
  
  <pre><code>    void MainWindow::set_plate(QString newPlate)
      {
          if(plate != newPlate){
              plate = newPlate;
              emit plate_changed(newPlate);
          }
      }
  
      MainWindow::MainWindow(QString p, QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow),
      plate(p)
      {
      .
      .
      .
      QTableWidgetItem* item2;
      item2 = new QTableWidgetItem(plate);
      ui-&gt;table-&gt;setItem(table-&gt;rowCount() - 1, 0, item2);
  }
  </code></pre>
  
  <blockquote>
    <p>main.cpp</p>
  </blockquote>
  
  <pre><code>int main(int argc, char *argv[])
  {
      QString plate;
      .
      .
      .
      //some changes on plate
  
      QApplication a(argc, argv);
      MainWindow w(plate);
      w.show();
      return a.exec();
  }
  </code></pre>
  
  <p>thanks </p>