raphaelf
3rd November 2006, 19:00
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? :crying:
void MainWindow::showPicure()
{
ui.label->clear();
QString src = (ui.listView->currentItem() )->text( 4 );
QMessageBox::information(this, "src", src);
QFileInfo file(src);
if(file.isReadable() == true)
{
Q3UrlOperator *op = new Q3UrlOperator();
QString temp_picture = "c:/temp/temp_album.jpg";
op->copy(src, temp_picture, false, false);
QMessageBox::information(this, "wait", "wait");
ui.label->setPixmap(QPixmap(temp_picture));
ui.picture_lb->setText("");
}
else
{
ui.picture_lb->setText("No Picture");
ui.label->clear();
}
}
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? :crying:
void MainWindow::showPicure()
{
ui.label->clear();
QString src = (ui.listView->currentItem() )->text( 4 );
QMessageBox::information(this, "src", src);
QFileInfo file(src);
if(file.isReadable() == true)
{
Q3UrlOperator *op = new Q3UrlOperator();
QString temp_picture = "c:/temp/temp_album.jpg";
op->copy(src, temp_picture, false, false);
QMessageBox::information(this, "wait", "wait");
ui.label->setPixmap(QPixmap(temp_picture));
ui.picture_lb->setText("");
}
else
{
ui.picture_lb->setText("No Picture");
ui.label->clear();
}
}