Hi wysota, i think i have understand now,
but my function test will never called why?
void MainWindow::showPicure()
{
ui.label->clear();
QString src
= (ui.
listView->currentItem
() )->text
( 4 );
if(file.isReadable() == true)
{
Q3UrlOperator *op = new Q3UrlOperator();
QString temp_picture
= "c:/temp/temp_album.jpg";
op->copy(src, temp_picture, false, false);
connect(op, SIGNAL(finished()), this, SLOT(test()));
ui.picture_lb->setText("");
}
else
{
ui.picture_lb->setText("No Picture");
ui.label->clear();
}
}
void MainWindow::test()
{
ui.
label->setPixmap
(QPixmap("c:/temp/temp_album.jpg"));
}
void MainWindow::showPicure()
{
ui.label->clear();
QString src = (ui.listView->currentItem() )->text( 4 );
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);
connect(op, SIGNAL(finished()), this, SLOT(test()));
ui.picture_lb->setText("");
}
else
{
ui.picture_lb->setText("No Picture");
ui.label->clear();
}
}
void MainWindow::test()
{
ui.label->setPixmap(QPixmap("c:/temp/temp_album.jpg"));
}
To copy to clipboard, switch view to plain text mode
Bookmarks