title: Strange behaviour of changing UI in QT
body: <p>I am trying to modify UI. However I did not understand in some function I cannot modify UI. For example:</p>
  
  <pre><code>// In this function there is nothing wrong.
  void FindUser::on_btnBrowse_clicked()
  {
  
      browseFileName = QFileDialog::getOpenFileName(this, tr("Select Image"),
                                              "file:///.1/", tr("Image Files (*.png *.jpg *.bmp)"));
  
      qDebug() &lt;&lt; browseFileName;
  
      if(browseFileName != "")
      {
          ui-&gt;btnFindPerson-&gt;setEnabled(true);
  
          selectedImg = QImage(browseFileName,"JPG");
  
          ui-&gt;lblFindPersonImage-&gt;setPixmap(QPixmap::fromImage(selectedImg));
          ui-&gt;lblFindPersonImage-&gt;setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
          ui-&gt;lblFindPersonImage-&gt;setScaledContents(true);
  
      }
      else
      {
          ui-&gt;btnFindPerson-&gt;setEnabled(false);
      }
  }
      // However in this function when some operation done. Ui is not changing. I am sure that userFound() is working because I can see output of qDebug() without any problem. And also I add some Qlabel, and also they are not changing too.
      void FindUser::userFound(QString imgFileName)
  {
  
  
      QStringList imgName = imgFileName.split(".");
  
      qDebug() &lt;&lt; imgName.at(0);
  
      QString resultImgFileName = "/.1/Projects/MGFaceApp/bin/db/visible/" + imgName.at(0) + ".jpg";
  
      QPixmap resultImgPixmap(resultImgFileName);
  
      qDebug() &lt;&lt; resultImgFileName;
  
      ui-&gt;lblFindResultImage-&gt;setPixmap(resultImgPixmap);
      ui-&gt;lblFindResultImage-&gt;setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
      ui-&gt;lblFindResultImage-&gt;setScaledContents(true);
  }
  </code></pre>
  
  <p>// Here is userFound(), where it is called.</p>
  
  <pre><code>bool ImageProcess::imgIdentfiy(QImage img_ident)
  {
      ....
  ....
      ....
      if(identifyMember.identify(......))
      {
          ....
  
          if(matchedImgName != "")
          {
              FindUser findUserMember;
              findUserMember.userFound(matchedImgName);
          }
      }
  
  ....
          qDebug() &lt;&lt; "Identify : DONE - DONE";
      return true;
  }
  </code></pre>
  
  <p>Here is also header file: </p>
  
  <pre><code>    namespace Ui {
  class FindUser;
  }
  
  class FindUser : public QWidget
  {
      Q_OBJECT
  
  public:
      explicit FindUser(QWidget *parent = 0);
      ~FindUser();
      void userFound(QString imgFileName);
  
  private slots:
      void on_btnBrowse_clicked();
  
      void on_btnFindPerson_clicked();
  
  
  private:
      Ui::FindUser *ui;
      QString browseFileName;
      QImage selectedImg;
      QString resultImgFileName;
  
  };
  </code></pre>
  
  <p>I am trying to find which option I should check, but none of my attempts solved this problem. Do you have any idea to find this ?</p>
  
  <p>EDITTED : Here is my actual code.</p>