Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to change sysem volume using Qt
Forum Updated to NodeBB v4.3 + New Features

How to change sysem volume using Qt

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aashish.lg
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      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.

      http://anavi.org/

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aashish.lg
        wrote on last edited by
        #3

        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();@
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved