How to change sysem volume using Qt
I wrote one Qt GUI application that uses QWebView. I would like to change system volume at run time using my Qt application. Please suggest how can we do it.
I tried by the casses suggested by you, but no help.
Since I dont deal with any media file playback so that I feel QMediaObject is not suitbale for this case. Howevwe I tried with AudioOutput, and Volume Slider class but no help in controlling the system volume.
Below mention is code that I wrote , please figure out where is the problem.
- Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
- audio = new Phonon::AudioOutput(Phonon::MusicCategory, this);
- Phonon::createPath(mediaObject, audio);
- volumeSlider = new Phonon::VolumeSlider;