The SoundPlayer class provides functionality to play sound effects.
More...
#include <SoundPlayer.h>
|
static void | playSound (const QString &filename) |
| Plays a sound effect from the specified file. More...
|
|
The SoundPlayer class provides functionality to play sound effects.
◆ SoundPlayer()
SoundPlayer::SoundPlayer |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Constructs a SoundPlayer object.
- Parameters
-
parent | The parent QObject (optional). |
◆ playSound()
void SoundPlayer::playSound |
( |
const QString & |
filename | ) |
|
|
static |
Plays a sound effect from the specified file.
- Parameters
-
filename | The path to the sound file to be played. |
This static method allows you to play a sound without needing an instance of SoundPlayer.
The documentation for this class was generated from the following files: