QT6设置音效之后没有声音 也没有报错请问是是什么原因捏 实在找不出来bug

QT6设置音效之后没有声音 也没有报错 现在使用的是资源路径 尝试用过本地路径也不可以 请问是是什么原因捏 实在找不出来bug

 //准备开始按钮的音效
    QSoundEffect*startsound=new QSoundEffect(this);
    startsound->setSource(QUrl::fromLocalFile(":/res/TapButtonSound.wav"));


    //开始按钮
    mypushbutton* startbtn=new mypushbutton(":/res/MenuSceneStartButton.png");
    startbtn->setParent(this);
    startbtn->move(this->width()*0.5-startbtn->width()*0.5,this->height()*0.7);
    //实例化选择关卡场景
    choosescene=new chooselevelscene;

    //监听选择关卡页面的返回按钮信号
    connect(choosescene,&chooselevelscene::back,[=](){
        this->setGeometry(choosescene->geometry());
        //将选择关卡场景隐藏掉
        choosescene->hide();
        //重新显示主场景
        this->show();
    });

    connect(startbtn,&mypushbutton::clicked,[=](){
        //播放开始音效资源
        startsound->play();
        //做弹起特效
        startbtn->zoom("down");
        startbtn->zoom("up");

在play前后打断点
setVolume试试

不知道你这个问题是否已经解决, 如果还没有解决的话:

如果你已经解决了该问题, 非常希望你能够分享一下解决方案, 写成博客, 将相关链接放在评论区, 以帮助更多的人 ^-^