antweb
19th March 2015, 17:12
How can I do this? Since phonon has been removed for version 5 and above, how do I show the status of my mediaplayer on a horizontal slider?
I tried doing this:
ui->hs->setRange(0, player.duration() / 1000);
ui->hs->setEnabled(player.duration() > 0);
connect(ui->hs, SIGNAL(valueChanged(int)), this, SLOT(seek(int)));
void MainWindow::seek(int seconds)
{
player.setPosition(seconds * 1000);
}
This does not even activate my horizontal slider. What is the issue?
I tried doing this:
ui->hs->setRange(0, player.duration() / 1000);
ui->hs->setEnabled(player.duration() > 0);
connect(ui->hs, SIGNAL(valueChanged(int)), this, SLOT(seek(int)));
void MainWindow::seek(int seconds)
{
player.setPosition(seconds * 1000);
}
This does not even activate my horizontal slider. What is the issue?