examples/multimedia/videographicsitem/videoplayer.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   117 void VideoPlayer::openFile()
   117 void VideoPlayer::openFile()
   118 {
   118 {
   119     QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"));
   119     QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"));
   120 
   120 
   121     if (!fileName.isEmpty()) {
   121     if (!fileName.isEmpty()) {
   122         if (videoItem->isStarted())
   122         videoItem->stop();
   123             videoItem->stop();
       
   124 
   123 
   125         movie.setFileName(fileName);
   124         movie.setFileName(fileName);
   126 
   125 
   127         playButton->setEnabled(true);
   126         playButton->setEnabled(true);
   128         positionSlider->setMaximum(movie.frameCount());
   127         positionSlider->setMaximum(movie.frameCount());