I have now removed the sleep and emitted a signal just after image has been formed.But still the image is not getting refreshed.
Here is what I am doing:
//GrabThread.cpp
Qt Code:
  1. void GrabThread::run()
  2. {
  3. ImageFormation();
  4. check=0;
  5. emit ImageRefreshSignal();
  6. }
To copy to clipboard, switch view to plain text mode 

Image processing finishes in ImageFormation() and after that I emit a signal 'ImageRefreshSignal', which I am catching in a dialog as follows:
//dialog_user.cpp
Qt Code:
  1. Dialog_user::Dialog_user(QWidget *parent) :
  2. QDialog(parent),
  3. ui(new Ui::Dialog_user)
  4. {
  5. ui->setupUi(this);
  6. ui->label->setPixmap(QPixmap("abc.bmp"));
  7. }
  8. Dialog_user::~Dialog_user()
  9. {
  10. delete ui;
  11. }
  12. void Dialog_user::ImageRefreshSlot()
  13. {
  14. qDebug()<<"inside slot";
  15. ui->label->setPixmap(QPixmap("abc.bmp"));
  16. }
To copy to clipboard, switch view to plain text mode 

I am successfully getting "inside slot" message,which indicates that ImageRefreshSlot() has been called,but still the image is not getting refreshed.

Have connected the signal-slot in main.cpp as follows:
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication a(argc, argv);
  4. MainWindow win;
  5. win.show();
  6. Dialog_user d_user;
  7. GrabThread gthread;
  8. QObject::connect( & gthread, SIGNAL( ImageRefreshSignal() ),& d_user, SLOT( ImageRefreshSlot() ) );
  9. gthread.start();
  10. return a.exec();
  11. }
To copy to clipboard, switch view to plain text mode