2、引用头文件#include <QSound>

3、代码:QSound::play(path+"test.wav");