Hi everybody

QT 4.1.3 WINXP MINGW

I have a functionm that copy a picture from a server local and show it.

My function work, but sometimes the copy process is not fast and i cant see the picture.

I am searching a solution for my function, that i wait until the picture is complete copied local, and then show it.

Have somebody a idea?
Qt Code:
  1. void MainWindow::showPicure()
  2. {
  3. ui.label->clear();
  4. QString src = (ui.listView->currentItem() )->text( 4 );
  5. QMessageBox::information(this, "src", src);
  6. QFileInfo file(src);
  7. if(file.isReadable() == true)
  8. {
  9.  
  10. Q3UrlOperator *op = new Q3UrlOperator();
  11. QString temp_picture = "c:/temp/temp_album.jpg";
  12. op->copy(src, temp_picture, false, false);
  13. QMessageBox::information(this, "wait", "wait");
  14. ui.label->setPixmap(QPixmap(temp_picture));
  15. ui.picture_lb->setText("");
  16. }
  17. else
  18. {
  19. ui.picture_lb->setText("No Picture");
  20. ui.label->clear();
  21. }
  22. }
To copy to clipboard, switch view to plain text mode