View Full Version : help me!

24th June 2011, 09:13
I have a button, when clicked on it, the app will pronounce "hello". But when multi click in a short time, the app will pronounce "hello" consecutive.
I want to click on the button when reading from hello continue receiving events click next.
Please help me!

I used Phonon pronounce .

24th June 2011, 09:55
You'll have to disable the "click" events during audio playback. You can disconnect your push button when audio is started, and connect it again when stopped. Alternatively, you can have a boolean variable to remember the audio state (on/off) and use it to start audio only if its "off" in your "button clicked" slot.
Btw. for future, try to give your topic more descriptive name :)

24th June 2011, 10:25
Thank stampede!
I'll try it your way, i used qthread but it not succesfull.
I'm currently trying to learn English, so I have difficulty in expressing my thoughts.

24th June 2011, 22:51
You can call QWidget::setEnabled() on your button with false as the argument when you start playing, and true when you finish playing. The button will not accept multiple clicks and changes to show the user that it cannot be clicked.