I have implemented it as :
// MainWindow.cpp consists of this snippet:
QTimer *timer = new QTimer;
QStringList fileName = QFileDialog::getOpenFileNames(this,
tr("Open Image"), "C:/qt-win-opensource-src-4.5.0/bin/", tr("Image Files (*.png *.jpg *.bmp *.avi *.gif)"));
QStringListIterator iterator(fileName);
label = new QLabel;
connect(timer,SIGNAL(timeout()),this,SLOT(nextPict ure(QStringListIterator&)));
timer->start(5000);
//And the slot nextPicture is defined as:
void MainWindow::nextPicture(QStringListIterator& iterator)
{
if(iterator.hasNext())
{
label->clear();
label->setPixmap(QPixmap(iterator.next()));
workspace->addWindow(label);
label->show();
}
}
But this is not displaying even a single image(which was getting displayed earlier).
Thanx in advance.
Bookmarks