提取声子中当前媒体对象源的文件名或 url

Extract the filename or url of the current source of mediaobject in phonon

我正在尝试在我的音乐播放器中使用 pyqt 和声子 module.for 创建歌词查看器,我需要提取本地文件的 url 或当前源的文件名。有什么办法吗?

QUrl MediaSource.url(self)就是你想要的。