I have a group of images being selected through a filedialog. Now how to move the slider accordingly...Following is a partial code for the filedialog implementation...........
//MAINclass constructor
{
fileName = QFileDialog::getOpenFileNames(this,
tr("Open Image"), "C:/qt-win-opensource-src-4.5.0/bin/", tr("Image Files (*.png *.jpg *.bmp *.avi *.gif)"));
timer = new QTimer;
iterator = new QStringListIterator(fileName);
connect(videoPlayerControls->playPauseButton,SIGNAL(clicked()),this,SLOT(playV ideo()));
}
void VideoPlayer:layVideo()
{
connect(timer, SIGNAL(timeout()), this, SLOT(nextPicture()));
timer->start(40);
}
void VideoPlayer::nextPicture()
{
if(iterator->hasNext())
{
videoDisplayer->clear();
videoDisplayer->setPixmap(QPixmap(iterator->next()));
}
}
Now, the slider is in a different class; which function in the QSlider class should I use and how so as to proportionally move the slider according to the number of images displayed?
Thanx in advance....
Bookmarks