Is there a way to play mp3s in Qt 4.5?
Thanks!
example from Qt Assistant
QT += phonon
Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,
Phonon::MediaSource("/path/mysong.mp3"));
music->play();
works perfectly.
Phonon library from KDE has been included already in 4.4 release of QT.
I think there's even some sample code that ships with qt that shows how to utilize phonon to play mp3 files (and more).
Documentation here: http://doc.qtsoftware.com/4.5/phonon-module.html
Phonon homepage: http://phonon.kde.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With