Solved QMediaPlayer Documentation is wrong, or am I ?
I was hoping that someone here could check my thinking. As far as I can tell, the Docs for QMediaPlayer appear to have a typo at the first example under details
player = new QMediaPlayer; connect(player, SIGNAL(positionChanged(qint64)), this, SLOT(positionChanged(qint64))); player->setMedia(QUrl::fromLocalFile("/Users/me/Music/coolsong.mp3")); # <- Here's the error player->setVolume(50); player->play();
player->setMediaappears to have the following signature:
void setMedia(const QMediaContent &media, QIODevice *stream = Q_NULLPTR)while
I'm new to Qt, so, I don't want to run off half-cocked and report an issue. I'll do so, but am I seeing this right ?
@SGaist Thanks, that clears that up for me. I didn't ask about it, to keep the question concise, but now I see how this complicates translating the example into the PyQt5 bindings, which is what I'm working through. So this explains why a c++ application could successfully mimic that example, but a PyQt5 binding application could not. Excellent answer, thanks again for the help.