I tried make a messagebox like this
Qt Code:
msg.setWindowTitle("Error"); msg.setText("Message"); msg.setDetailedText("Detail"); msg.exec();To copy to clipboard, switch view to plain text mode
But, why I lost critical message sound ??
I tried make a messagebox like this
Qt Code:
msg.setWindowTitle("Error"); msg.setText("Message"); msg.setDetailedText("Detail"); msg.exec();To copy to clipboard, switch view to plain text mode
But, why I lost critical message sound ??
Because you are using the Qt message box that doesn't make sounds instead of the native message box that is used when you use static methods of QMessageBox.
I need make with dinamic way, not static. How to set the sound ? I look in the Qt doc, there is nothing to set a sound on QMessageBox..
Not automatically, anyway. If you want to have a sound accompany the appearance of your widget, you'll have to arrange for that yourself. And if you want the sound to be one of the system sounds, you'll have to figure out how they're organized and stored, and how to access them reliably; they're managed by whatever desktop system you're using.
Or, you can simply settle for the static calls, which already make use of a native widget.
Bookmarks