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.
You can use "Phonon::AudioOutput":http://doc.qt.nokia.com/4.7-snapshot/phonon-audiooutput.html or "QMediaPlayer":http://doc.qt.nokia.com/qtmobility/qmediaplayer.html Here is a "media player example using qt mobility":http://doc.qt.nokia.com/qtmobility/player.html.
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; volumeSlider->setAudioOutput(audio); volumeSlider->show();@