Reputation: 135
I was trying to rebuild an old project, recreating a new project with all my old files, I get this weird error: "No member named 'setMedia' in 'QMediaPlayer' QMultimedia is well set up. The library has been changed? There are no resources on the web about this
Thanks
Upvotes: 0
Views: 2405
Reputation: 1
I am using Qt 6.5 LTS and faced the same issue. Replacing setMedia by setSource worked for me.
void setSource(const QUrl &source); is coming from Qt 6 as per the documentation.
Please refer the documentation and check against your Qt version - https://doc.qt.io/qt-6/qmediaplayer.html
Upvotes: 0
Reputation: 76
It looks like you are using Qt6. In Qt6 setMedia
was changed to setSource
. You can find info in docs.
Upvotes: 1