PDA

View Full Version : QAudioRecorder and QProgress bar



roger78
29th August 2015, 02:01
Hi, i am trying to create a QProgressBar that updates every seconds starting from the moment the record function of QAudioRecorder is called.

Problem is, the progress bar does not update !

The QProgressBar is a member of the centralWidget of my QMainWindow.

I tried adding a QTimer to a QAudioRecorder wrapper class that I created and connect the timeout() signal to the setValue of my CentralWidget's progress bar.

More precisly I connected this last signal (timeout) to a slot in my centralWidget wich does: setValue(time) and QApplication::processEvents();
but it doesn't work.

Please could you help me fix this progress bar ?

Also I don't know how the QAudioRecorder does its work when the record function is called. Is it launched in a new thread ?

Thanks for your help !

anda_skoa
29th August 2015, 14:07
Did you start the timer?
Did you increase the value that gets set with QProgressBar::setValue()?

Cheers,
_

Frdz
29th August 2015, 20:50
Probably one or more of your signal related to progress bar update is not emitted. Test it one by one to find out which one doesn't work.
Better if you post your code related to progress bar update circle.