now i can built the code but the program thanks
but i can't control the system volume
void dcsinter::volume()
{
ui->horizontalSlider->setMinimum(0);
ui->horizontalSlider->setMaximum(100);
ui->horizontalSlider->setSingleStep(5);
int pos = ui->horizontalSlider->sliderPosition();
qreal apos = pos/100;
Phonon::AudioOutput *saudio = new Phonon::AudioOutput;
saudio->setVolume(apos); ;
qreal aout = saudio->volume();
int out = aout * 100;
ui->horizontalSlider->setValue(out);
}
void dcsinter::volume()
{
ui->horizontalSlider->setMinimum(0);
ui->horizontalSlider->setMaximum(100);
ui->horizontalSlider->setSingleStep(5);
int pos = ui->horizontalSlider->sliderPosition();
qreal apos = pos/100;
Phonon::AudioOutput *saudio = new Phonon::AudioOutput;
saudio->setVolume(apos); ;
qreal aout = saudio->volume();
int out = aout * 100;
ui->horizontalSlider->setValue(out);
}
To copy to clipboard, switch view to plain text mode
thanks
Added after 1 1:
i heard in the Qt developers form that phonon can't control system volume or master volume
so is there any other way to control master volume
Bookmarks