August 2018
Intermediate to advanced
534 pages
11h 21m
English
The project application ch11-drum-machine displays four SoundEffectWidget widgets: kickWidget, snareWidget, hihatWidget, and crashWidget.
Each SoundEffectWidget widget displays a QLabel and a QPushButton. The label displays the sound name. If the button is clicked, a sound is played.
The Qt Multimedia module provides two main ways to play an audio file:
This project example is a virtual drum machine, so we are using a QSoundEffect object. The first step to using a QSoundEffect is to update your .pro file as shown in the following code:
QT += core ...
Read now
Unlock full access