Results 1 to 3 of 3

Thread: QAudioRecorder and QProgress bar

  1. #1
    Join Date
    Aug 2015
    Location
    France
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QAudioRecorder and QProgress bar

    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 !

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QAudioRecorder and QProgress bar

    Did you start the timer?
    Did you increase the value that gets set with QProgressBar::setValue()?

    Cheers,
    _

  3. #3
    Join Date
    Aug 2015
    Location
    Gdansk, Poland
    Posts
    21
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QAudioRecorder and QProgress bar

    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.

Similar Threads

  1. Save QAudioRecorder to QByteArray
    By vanillac in forum Qt Programming
    Replies: 5
    Last Post: 28th March 2015, 09:59
  2. QProgress bar - Busy Indicator - Strange behaviour
    By johnnyturbo3 in forum Newbie
    Replies: 4
    Last Post: 27th April 2011, 14:56
  3. QProgress Bar-Time Measuring
    By aegis in forum Qt Programming
    Replies: 4
    Last Post: 13th May 2007, 17:47
  4. Problem with QProgress in Qt4
    By fyanardi in forum Newbie
    Replies: 2
    Last Post: 7th May 2006, 17:59

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.