hello all
I have a question how I can play music in slot with timer
I test in main programming and music nice play ,but I can not test loop with Qtimer ,
this is my code ,plz help

main:
Qt Code:
  1. ui->setupUi(this);
  2. mediaObject = new Phonon::MediaObject(this);
  3. audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
  4. mediaObject->setCurrentSource(Phonon::MediaSource("/home/beep.wav"));
  5. Phonon::createPath(mediaObject, audioOutput);
  6. mediaObject->play(); //play
  7. m_timer =new QTimer(this);
  8. connect(m_timer,SIGNAL(timeout()),this,SLOT(play_music()));
  9. m_timer->start(1000);
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void MainWindow::play_music()
  2. {
  3. mediaObject->setCurrentSource(Phonon::MediaSource("/home/beep.wav"));
  4. mediaObject->play();
  5. }
To copy to clipboard, switch view to plain text mode