简单的代码如下:
Phonon::MediaSource source1("it's ok.mp3");
Phonon::MediaSource source2("it's ok.mp3");
if(source1 == source2)
{
.....
}
else
{
....
}
为什么上面的判断是返回false?我也查了一下QT参考文档是这样说的:
bool MediaSource::operator== ( const MediaSource & other ) const
Returns true if this media source is equal to the other media source; otherwise returns false.
什么时候返回True?