Set volume globally

  • Hi,
    is it possible to globally set volume of audio output of my application?

    I have several QSoundEffect sounds in my QML application. I thought about the possibility to set some global context variable (double with 0.0 to 1.0 value) to QML and then use it in my sounds:

    SoundEffect {
            volume: 0.25 * myGlobalVolume

    However, is there a better way to achieve this?

  • Lifetime Qt Champion


    Do you mean something like a VolumeController object that has a volume property ? You could set it using setContextProperty, then it would be available to your effects.

    Hope it helps.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.