QMessageBox and beep after migrate from 4 to 5 qt

大兔子大兔子 提交于 2019-12-11 18:25:37

问题


After migrate project from Qt4 to Qt5 version on Windows OS lost "beep" sound on QMessageBox::(information/critical/warning/question) function. Hove can I retrieve it?


回答1:


Unfortunately there is no option to enable beep sound in QMessageBox. But you can use QApplication::beep() when you show message box.

If you don't want call beep() where you show message box and if you you think that you really need this, you can subclass QMessageBox and add some method which will call QApplication::beep()



来源:https://stackoverflow.com/questions/26997999/qmessagebox-and-beep-after-migrate-from-4-to-5-qt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!