Results 1 to 1 of 1

Thread: how to move the slider according to the images being displayed on a label

  1. #1
    Join Date
    Jul 2010
    Posts
    50
    Thanks
    7
    Platforms
    Windows

    Default how to move the slider according to the images being displayed on a label

    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....
    Last edited by qt_user; 2nd August 2010 at 12:13.

Similar Threads

  1. Replies: 6
    Last Post: 30th July 2010, 07:23
  2. How do i change images? Qt creator label>pixmap
    By QueenZ in forum Qt Programming
    Replies: 4
    Last Post: 8th February 2010, 04:44
  3. gif formate images is not displayed in linux
    By addu in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2009, 06:37
  4. I hope to move the slider bar in QGraphicsView automatically
    By learning_qt in forum Qt Programming
    Replies: 1
    Last Post: 21st November 2008, 14:35
  5. Images/icons. It's not displayed
    By LMZ in forum Qt Tools
    Replies: 37
    Last Post: 18th May 2007, 14:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.